Skip to content

Commit

Permalink
Merge pull request #110 from HPI-SWA-Lab/buildscript-readability
Browse files Browse the repository at this point in the history
Buildscript readability
  • Loading branch information
timfel committed Sep 28, 2015
2 parents 12b14a9 + e76315b commit 764e019
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import sys, os

if __name__ == "__main__":
if not reduce(bool.__or__, [arg.startswith("-O") for arg in sys.argv]):
if not any(arg.startswith("-O") for arg in sys.argv):
sys.argv.append("--batch")
sys.argv.append("-Ojit")
if not reduce(bool.__or__, [arg.startswith("--gcrootfinder") for arg in sys.argv]):
if not any(arg.startswith("--gcrootfinder") for arg in sys.argv):
# default to shadowstack, so all platforms are created equal
# (and also because asmgcc doesn't work when cross-compiling
# on Linux, where it is the default)
Expand Down
8 changes: 4 additions & 4 deletions .build/jittests.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#! /usr/bin/env python

import sys, zlib, base64
import sys
from os import path
from environment import cp, config

if __name__ == "__main__":
if not reduce(bool.__or__, [arg.startswith("--jit") for arg in sys.argv]):
if not any(arg.startswith("--jit") for arg in sys.argv):
sys.argv.append("--jit=%s" % path.join(path.dirname(__file__), "..", "rsqueak"))
if not reduce(bool.__or__, [arg.startswith("--squeak") for arg in sys.argv]):
if not any(arg.startswith("--squeak") for arg in sys.argv):
squeak = cp.get("General", "squeak")
if not path.exists(squeak):
print "WARN: You need to configure where to find the squeak binary in %s to run the full suite of JIT tests" % config
sys.argv.append("--squeak=%s" % squeak)
if not reduce(bool.__or__, [arg.find("jittest/test") != -1 for arg in sys.argv]):
if not any(arg.find("jittest/test") != -1 for arg in sys.argv):
sys.argv.append(path.join(path.dirname(__file__), "..", "spyvm", "test", "jittest"))

import pytest
Expand Down
2 changes: 1 addition & 1 deletion .build/shell.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env python

import sys, os, subprocess
import sys, os

if __name__ == "__main__":
import environment, code
Expand Down
7 changes: 3 additions & 4 deletions .build/unittests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

#! /usr/bin/env python

import sys, zlib, base64
import sys
from os import path
from environment import cp
import environment

if __name__ == "__main__":
if not reduce(bool.__or__, [arg.find("/test") != -1 or arg.find("\\test") != -1
for arg in sys.argv]):
if not any("/test" in arg or "\\test" in arg for arg in sys.argv):
sys.argv.append(path.join(path.dirname(__file__), "..", "spyvm", "test"))

import pytest
Expand Down

0 comments on commit 764e019

Please sign in to comment.