From 9c0dc1f4957420688cf2c1afe79fa2f53f2a6abf Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 5 Sep 2018 00:00:14 +0300 Subject: Create .buildignore file in testscript root working directory --- tests/name/pattern.testscript | 15 +++++++++++++++ tests/test/script/integration/testscript | 8 +++++--- tests/test/script/runner/redirect.testscript | 4 ++++ 3 files changed, 24 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/name/pattern.testscript b/tests/name/pattern.testscript index d40e3a4..1c9d6f5 100644 --- a/tests/name/pattern.testscript +++ b/tests/name/pattern.testscript @@ -181,6 +181,21 @@ EOI $* <'print .*/*.txt' >/'.dir/foo.txt' : dir-interm-incl } +: buildignore +: +: Test filtering of a directory and its sub-entries if it contains the +: .buildignore file. +: +{ + mkdir dir1 dir2; + touch dir2/.buildignore; + $* <'print */' >/'dir1/' : self-excl + + mkdir dir1 dir2; + touch dir1/foo dir2/foo dir2/.buildignore; + $* <'print f**' >/'dir1/foo' : sub-entry-excl +} + : expansion : : Test interaction with expansion/concatenation/re-parse. diff --git a/tests/test/script/integration/testscript b/tests/test/script/integration/testscript index 7bdad54..b399197 100644 --- a/tests/test/script/integration/testscript +++ b/tests/test/script/integration/testscript @@ -50,7 +50,8 @@ EOE : wd-exists-before : touch foo.testscript; -mkdir test &!test/; +mkdir --no-cleanup test; +touch --no-cleanup test/.buildignore; $* <>/EOE ./: testscript{foo} EOI @@ -60,8 +61,9 @@ EOE : wd-not-empty-before : touch foo.testscript; -mkdir test &!test/; -touch test/dummy &!test/dummy; +mkdir --no-cleanup test; +touch --no-cleanup test/.buildignore; +touch --no-cleanup test/dummy; $* <>/EOE ./: testscript{foo} EOI diff --git a/tests/test/script/runner/redirect.testscript b/tests/test/script/runner/redirect.testscript index 21e9d07..7e4e42d 100644 --- a/tests/test/script/runner/redirect.testscript +++ b/tests/test/script/runner/redirect.testscript @@ -43,12 +43,14 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex. $c <'$* -o foo >!' && $b >foo 2>>/~%EOE% %test .+% mkdir test/ + touch test/.buildignore cd test/ mkdir test/1/ cd test/1/ %.*/driver(.exe)? -o foo% rmdir test/1/ cd test/ + rm test/.buildignore rmdir test/ cd ./ EOE @@ -58,6 +60,7 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex. $c <'$* -e foo 2>!' && $b 2>>/~%EOE% %test .+% mkdir test/ + touch test/.buildignore cd test/ mkdir test/1/ cd test/1/ @@ -65,6 +68,7 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex. foo rmdir test/1/ cd test/ + rm test/.buildignore rmdir test/ cd ./ EOE -- cgit v1.1