From 0ed86c76239d4f2904ea4ae1a77902a9e0db2a6d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 1 Dec 2016 12:07:18 +0200 Subject: Move old tests to old-tests/ --- tests/variable/override/build/bootstrap.build | 2 - tests/variable/override/buildfile | 58 ----- tests/variable/override/cache | 13 - tests/variable/override/p/build/bootstrap.build | 1 - tests/variable/override/p/buildfile | 49 ---- tests/variable/override/p/loader | 1 - tests/variable/override/simple | 3 - tests/variable/override/test.sh | 312 ------------------------ 8 files changed, 439 deletions(-) delete mode 100644 tests/variable/override/build/bootstrap.build delete mode 100644 tests/variable/override/buildfile delete mode 100644 tests/variable/override/cache delete mode 100644 tests/variable/override/p/build/bootstrap.build delete mode 100644 tests/variable/override/p/buildfile delete mode 100644 tests/variable/override/p/loader delete mode 100644 tests/variable/override/simple delete mode 100755 tests/variable/override/test.sh (limited to 'tests/variable/override') diff --git a/tests/variable/override/build/bootstrap.build b/tests/variable/override/build/bootstrap.build deleted file mode 100644 index 1c2e239..0000000 --- a/tests/variable/override/build/bootstrap.build +++ /dev/null @@ -1,2 +0,0 @@ -project = override -amalgamation = # Disabled. diff --git a/tests/variable/override/buildfile b/tests/variable/override/buildfile deleted file mode 100644 index c090e81..0000000 --- a/tests/variable/override/buildfile +++ /dev/null @@ -1,58 +0,0 @@ -if ($t != [null]) -{ - [$t] v = [null] -} - -print "/ :" $(/: v) - -if ($a == as) -{ - v = x -} -elif ($a == ap) -{ - v += s -} -elif ($a == pr) -{ - v =+ p -} - -print ". :" $v - -d/: -{ - if ($d_a == as) - { - v = x - } - elif ($d_a == ap) - { - v += s - } - elif ($d_a == pr) - { - v =+ p - } - - print "d :" $v - - - if ($d_t_a == as) - { - file{t}: v = x - } - elif ($d_t_a == ap) - { - file{t}: v += s - } - elif ($d_t_a == pr) - { - file{t}: v =+ p - } - - print "d/t :" $(file{t}: v) -} - -include p/ -./: diff --git a/tests/variable/override/cache b/tests/variable/override/cache deleted file mode 100644 index 8378688..0000000 --- a/tests/variable/override/cache +++ /dev/null @@ -1,13 +0,0 @@ -x = [string] 0 -print $x - -x = [uint64] 1 -print $x - -y = 0 -print $y - -[uint64] y = [null] -print $y - -./: diff --git a/tests/variable/override/p/build/bootstrap.build b/tests/variable/override/p/build/bootstrap.build deleted file mode 100644 index 723e2a3..0000000 --- a/tests/variable/override/p/build/bootstrap.build +++ /dev/null @@ -1 +0,0 @@ -project = override-p diff --git a/tests/variable/override/p/buildfile b/tests/variable/override/p/buildfile deleted file mode 100644 index 527b9ae..0000000 --- a/tests/variable/override/p/buildfile +++ /dev/null @@ -1,49 +0,0 @@ -if ($p_a == as) -{ - v = x -} -elif ($p_a == ap) -{ - v += s -} -elif ($p_a == pr) -{ - v =+ p -} - -print "p :" $v - -d/: -{ - if ($p_d_a == as) - { - v = x - } - elif ($p_d_a == ap) - { - v += s - } - elif ($p_d_a == pr) - { - v =+ p - } - - print "p/d :" $v - - if ($p_d_t_a == as) - { - file{t}: v = x - } - elif ($p_d_t_a == ap) - { - file{t}: v += s - } - elif ($p_d_t_a == pr) - { - file{t}: v =+ p - } - - print "p/d/t :" $(file{t}: v) -} - -./: diff --git a/tests/variable/override/p/loader b/tests/variable/override/p/loader deleted file mode 100644 index f298dcc..0000000 --- a/tests/variable/override/p/loader +++ /dev/null @@ -1 +0,0 @@ -include ../buildfile diff --git a/tests/variable/override/simple b/tests/variable/override/simple deleted file mode 100644 index 899daa2..0000000 --- a/tests/variable/override/simple +++ /dev/null @@ -1,3 +0,0 @@ -print $foo - -./: diff --git a/tests/variable/override/test.sh b/tests/variable/override/test.sh deleted file mode 100755 index a8b08b2..0000000 --- a/tests/variable/override/test.sh +++ /dev/null @@ -1,312 +0,0 @@ -#! /usr/bin/env bash - -verbose=n - -# By default when MSYS2 executable (bash.exe in particular) runs another -# executable it converts arguments that look like POSIX paths to Windows -# representations. More about it at: -# -# http://www.mingw.org/wiki/Posix_path_conversion -# -# So when you run b /v=X, build2 gets 'C:/msys64/v=X' argument instead of -# '/v=X'. To disable this behavior set MSYS2_ARG_CONV_EXCL environment -# variable, so all arguments starting with / will not be converted. You can -# list more prefixes using ';' as a separator. -# -export MSYS2_ARG_CONV_EXCL=/ - -tmp_file=`mktemp` - -# Remove temporary file on exit. Cover the case when exit due to an error. -# -trap 'rm -f $tmp_file' EXIT - -function error () { echo "$*" 1>&2; exit 1; } - -function fail () -{ - if [ "$verbose" = "y" ]; then - b $* - else - b -q $* 2>/dev/null - fi - - if [ $? -eq 0 ]; then - error "succeeded: b $*" - fi - - return 0 -} - -function test () -{ - b -q $* >$tmp_file - - if [ $? -ne 0 ]; then - error "failed: b -q $* >$tmp_file" - fi - - diff --strip-trailing-cr -u - $tmp_file - - if [ $? -ne 0 ]; then - error "failed: b $*" - fi -} - -fail foo=bar[] # error: unexpected [ in variable assignment 'foo=bar[]' -fail foo=[string]bar # error: typed override of variable foo -fail "!foo=bar" "!foo=BAR" # error: multiple global overrides of variable foo -fail "foo=bar" "foo=BAR" # error: multiple project overrides of variable foo -fail "%foo=bar" "%foo=BAR" # error: multiple project overrides of variable foo - -test --buildfile simple foo=bar ./ ./ <<< "bar" # Multiple bootstraps of the same project. - -# Visibility/qualification. -# -test !v=X <