Sorry, it's attached now.

Yep, I'm aware that you can invoke the script from anywhere the hierarchy.
I've found the prefix reduction still useful if only one case is failing in
a directory and I want fast edit/compile/run cycles for that single test.


On Fri, Jan 3, 2014 at 11:27 AM, Marshall Clow <[email protected]>wrote:

> On Dec 31, 2013, at 5:06 AM, Albert Wong (王重傑) <[email protected]> wrote:
>
> Hello!
>
> This was a simple modification to testit which allows for filtering test
> based on an environment variable. It was originally done to the android ndk
> variant of this script (where it was very useful for reducing
> compile/run/debug cycle times) so I thought I'd backport it incase anyone
> wanted it.
>
> Usage would be:
>
> libcxx/test/language.support/support.dynamic/new.delete/new.delete.single$ 
> TEST_PREFIX=new_replace ../../../../testit
>
> Albert —
>
> I see no patch here.
>
> Also, are you aware that you can invoke the test it script from anywhere
> in the test directory hierarchy, and it will test “from there down”?
>
> — Marshall
>
>
>
commit a19e5c59ea210dcd3569b6b98fb9ac8d9be70536
Author: Albert J. Wong <[email protected]>
Date:   Tue Dec 31 04:57:20 2013 -0800

    Allows filtering of test cases by prefix based on TEST_PREFIX env variable.
    
    Change-Id: I90d00135e8e11297425cccb2f47a2d174c991efc

diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/testit b/sources/cxx-stl/llvm-libc++/libcxx/test/testit
index 18b0814..30bd39b 100755
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/testit
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/testit
@@ -76,9 +76,9 @@ IMPLEMENTED_PASS=0
 afunc() {
 	fail=0
 	pass=0
-	if (ls *.fail.cpp > /dev/null 2>&1)
+	if (ls ${TEST_PREFIX}*fail.cpp > /dev/null 2>&1)
 	then
-		for FILE in $(ls *.fail.cpp); do
+		for FILE in $(ls ${TEST_PREFIX}*fail.cpp); do
 			if $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE $LIBS -o ./$TEST_EXE > /dev/null 2>&1
 			then
 				rm ./$TEST_EXE
@@ -90,9 +90,9 @@ afunc() {
 		done
 	fi
 
-	if (ls *.pass.cpp > /dev/null 2>&1)
+	if (ls ${TEST_PREFIX}*pass.cpp > /dev/null 2>&1)
 	then
-		for FILE in $(ls *.pass.cpp); do
+		for FILE in $(ls ${TEST_PREFIX}*pass.cpp); do
             if [ "$VERBOSE" ]
             then
              	echo "Running test: " $FILE
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to