remind test.py how to build on unix and limit build scope when posible
authorCraig Dowell <craigdo@ee.washington.edu>
Fri Oct 30 10:23:40 2009 -0700 (3 months ago)
changeset 5516d3aabb63dd12
parent 5515 3d1c26170e5c
child 5517 61831e265e20
remind test.py how to build on unix and limit build scope when posible
test.py
     1.1 --- a/test.py	Thu Oct 29 15:39:41 2009 +0300
     1.2 +++ b/test.py	Fri Oct 30 10:23:40 2009 -0700
     1.3 @@ -804,11 +804,33 @@
     1.4          # For example, if the user only wants to run BVT tests, we only have
     1.5          # to build the test-runner and can ignore all of the examples.
     1.6          #
     1.7 +        # If the user only wants to run a single example, then we can just build
     1.8 +        # that example.
     1.9 +        #
    1.10 +        # If there is no constraint, then we have to build everything since the
    1.11 +        # user wants to run everything.
    1.12 +        #
    1.13          if options.kinds or options.list or (len(options.constrain) and options.constrain in core_kinds):
    1.14 -            proc = subprocess.Popen("waf --target=test-runner", shell = True)
    1.15 +            if sys.platform == "win32":
    1.16 +                waf_cmd = "waf --target=test-runner"
    1.17 +            else:
    1.18 +                waf_cmd = "./waf --target=test-runner"
    1.19 +        elif len(options.example):
    1.20 +            if sys.platform == "win32":
    1.21 +                waf_cmd = "waf --target=%s" % os.path.basename(options.example)
    1.22 +            else:
    1.23 +                waf_cmd = "./waf --target=%s" % os.path.basename(options.example)
    1.24 +
    1.25          else:
    1.26 -            proc = subprocess.Popen("waf", shell = True)
    1.27 +            if sys.platform == "win32":
    1.28 +                waf_cmd = "waf"
    1.29 +            else:
    1.30 +                waf_cmd = "./waf"
    1.31  
    1.32 +        if options.verbose:
    1.33 +            print "Building: %s" % waf_cmd
    1.34 +
    1.35 +        proc = subprocess.Popen(waf_cmd, shell = True)
    1.36          proc.communicate()
    1.37  
    1.38      #