scons: Add aliases for the llvmpipe unit tests.
authorJosé Fonseca <jfonseca@vmware.com>
Sat, 19 Feb 2011 10:29:59 +0000 (10:29 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 19 Feb 2011 10:56:05 +0000 (10:56 +0000)
Now one can simply do

  scons lp_test_format

src/gallium/drivers/llvmpipe/SConscript

index 26b258b956957cac81a0f71788980928461f4850..c10a8cbc12c8e406fbb22323fec2d6a996bf0cd4 100644 (file)
@@ -96,10 +96,15 @@ if env['platform'] != 'embedded':
         tests.append('round')
 
     for test in tests:
+        testname = 'lp_test_' + test
         target = env.Program(
-            target = 'lp_test_' + test,
-            source = ['lp_test_' + test + '.c', 'lp_test_main.c'],
+            target = testname,
+            source = [testname + '.c', 'lp_test_main.c'],
         )
         env.InstallProgram(target)
+        
+        # http://www.scons.org/wiki/UnitTests
+        alias = env.Alias(testname, [target], target[0].abspath)
+        AlwaysBuild(alias)
 
 Export('llvmpipe')