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/ --- old-tests/scope/amalgamation/build/bootstrap.build | 3 ++ old-tests/scope/amalgamation/buildfile | 1 + .../scope/amalgamation/l1/build/bootstrap.build | 16 ++++++++++ old-tests/scope/amalgamation/l1/buildfile | 37 ++++++++++++++++++++++ .../scope/amalgamation/l1/l2/build/bootstrap.build | 2 ++ old-tests/scope/test-1.out | 15 +++++++++ old-tests/scope/test-2.out | 15 +++++++++ old-tests/scope/test.sh | 15 +++++++++ 8 files changed, 104 insertions(+) create mode 100644 old-tests/scope/amalgamation/build/bootstrap.build create mode 100644 old-tests/scope/amalgamation/buildfile create mode 100644 old-tests/scope/amalgamation/l1/build/bootstrap.build create mode 100644 old-tests/scope/amalgamation/l1/buildfile create mode 100644 old-tests/scope/amalgamation/l1/l2/build/bootstrap.build create mode 100644 old-tests/scope/test-1.out create mode 100644 old-tests/scope/test-2.out create mode 100755 old-tests/scope/test.sh (limited to 'old-tests/scope') diff --git a/old-tests/scope/amalgamation/build/bootstrap.build b/old-tests/scope/amalgamation/build/bootstrap.build new file mode 100644 index 0000000..ee73365 --- /dev/null +++ b/old-tests/scope/amalgamation/build/bootstrap.build @@ -0,0 +1,3 @@ +project = scope-amalgamation +amalgamation = # Disabled. +using config diff --git a/old-tests/scope/amalgamation/buildfile b/old-tests/scope/amalgamation/buildfile new file mode 100644 index 0000000..9f80de9 --- /dev/null +++ b/old-tests/scope/amalgamation/buildfile @@ -0,0 +1 @@ +./: diff --git a/old-tests/scope/amalgamation/l1/build/bootstrap.build b/old-tests/scope/amalgamation/l1/build/bootstrap.build new file mode 100644 index 0000000..6bde838 --- /dev/null +++ b/old-tests/scope/amalgamation/l1/build/bootstrap.build @@ -0,0 +1,16 @@ +project = scope-amalgamation-l1 +using config + +# At this stage we don't know ../ is a project. This +# tests an out-of-project scope that will later be +# replaced with an in-project scope. Note that the +# replacement will only occur if src_root != out_root. +# If they are the same, then this scope will simply +# be "upgraded". +# +$src_root/../: +{ + print 0: $project + print 0: $src_base + print 0: $out_base +} diff --git a/old-tests/scope/amalgamation/l1/buildfile b/old-tests/scope/amalgamation/l1/buildfile new file mode 100644 index 0000000..55d8c64 --- /dev/null +++ b/old-tests/scope/amalgamation/l1/buildfile @@ -0,0 +1,37 @@ +# Out of amalgamation. +# +../../: +{ + print -1: $project + print -1: $src_base + print -1: $out_base +} + +# In amalgamation. +# +../s/: +{ + print 0: $project + print 0: $src_base + print 0: $out_base +} + +# In project. +# +s/: +{ + print 1: $project + print 1: $src_base + print 1: $out_base +} + +# In sub-project. +# +l2/s/: +{ + print 2: $project + print 2: $src_base + print 2: $out_base +} + +./: diff --git a/old-tests/scope/amalgamation/l1/l2/build/bootstrap.build b/old-tests/scope/amalgamation/l1/l2/build/bootstrap.build new file mode 100644 index 0000000..0262763 --- /dev/null +++ b/old-tests/scope/amalgamation/l1/l2/build/bootstrap.build @@ -0,0 +1,2 @@ +project = scope-amalgamation-l2 +using config diff --git a/old-tests/scope/test-1.out b/old-tests/scope/test-1.out new file mode 100644 index 0000000..0273bf1 --- /dev/null +++ b/old-tests/scope/test-1.out @@ -0,0 +1,15 @@ +0: +0: +0: +-1: +-1: +-1: +0: scope-amalgamation +0: /home/boris/work/build2/build2/tests/scope/amalgamation/s/ +0: /home/boris/work/build2/build2/tests/scope/amalgamation/s/ +1: scope-amalgamation-l1 +1: /home/boris/work/build2/build2/tests/scope/amalgamation/l1/s/ +1: /home/boris/work/build2/build2/tests/scope/amalgamation/l1/s/ +2: scope-amalgamation-l2 +2: /home/boris/work/build2/build2/tests/scope/amalgamation/l1/l2/s/ +2: /home/boris/work/build2/build2/tests/scope/amalgamation/l1/l2/s/ diff --git a/old-tests/scope/test-2.out b/old-tests/scope/test-2.out new file mode 100644 index 0000000..88f9620 --- /dev/null +++ b/old-tests/scope/test-2.out @@ -0,0 +1,15 @@ +0: +0: +0: +-1: +-1: +-1: +0: scope-amalgamation +0: /home/boris/work/build2/build2/tests/scope/amalgamation/s/ +0: /home/boris/work/build2/build2/tests/scope/a-out/s/ +1: scope-amalgamation-l1 +1: /home/boris/work/build2/build2/tests/scope/amalgamation/l1/s/ +1: /home/boris/work/build2/build2/tests/scope/a-out/l1/s/ +2: scope-amalgamation-l2 +2: /home/boris/work/build2/build2/tests/scope/amalgamation/l1/l2/s/ +2: /home/boris/work/build2/build2/tests/scope/a-out/l1/l2/s/ diff --git a/old-tests/scope/test.sh b/old-tests/scope/test.sh new file mode 100755 index 0000000..2728a9d --- /dev/null +++ b/old-tests/scope/test.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# In-tree. +# +b amalgamation/l1/ 2>/dev/null | diff --strip-trailing-cr -u test-1.out - + +# Out-of-tree. +# +rm -rf a-out/ +b 'configure(amalgamation/@a-out/)' 2>/dev/null + +b amalgamation/l1/@a-out/l1/ 2>/dev/null | \ + diff --strip-trailing-cr -u test-2.out - + +rm -rf a-out/ -- cgit v1.1