Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
biojppm committed May 4, 2020
1 parent eced1fe commit 7ce02e6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/c4/cmany/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def _handle_hidden_args__skip_rest(args):

# -----------------------------------------------------------------------------
def add_basic(parser):
parser.add_argument("-P", "--proj_dir", default=None,
parser.add_argument("-P", "--proj-dir", "--proj_dir", default=None,
help="""the directory where the project's
CMakeLists.txt is located. An empty argument will
default to the current directory ie, "." or, if
Expand All @@ -152,9 +152,9 @@ def add_basic(parser):
build directory. Passing a directory which
does not contain a CMakeLists.txt or CMakeCache.txt
will cause an error.""")
parser.add_argument("-B", "--build-root", default="./build",
parser.add_argument("-B", "--build-root", "--build_root", default="./build",
help="set the build root (defaults to ./build). ")
parser.add_argument("-I", "--install-root", default="./install",
parser.add_argument("-I", "--install-root", "--install_root", default="./install",
help="set the install root (defaults to ./install)")
parser.add_argument("-j", "--jobs", default=cpu_count(),
help="""use the given number of parallel jobs
Expand Down
16 changes: 8 additions & 8 deletions test/test05cmany.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def run_projs(testobj, args, check_fn=None):
id = '.test/0--default--install'
for p in projs:
with testobj.subTest(msg="default parameters", proj=p.proj):
p.run(args + ['--build-dir', bd, '--install-dir', id])
p.run(args + ['--build-root', bd, '--install-root', id])
if check_fn:
tb = TestBuild(proj=p, buildroot=bd, installroot=id,
compiler=cmany.Compiler.default(),
Expand Down Expand Up @@ -194,8 +194,8 @@ def run_projs(testobj, args, check_fn=None):
id = '.test/2.1--comps{}--types{}--variants{}--install'.format(len(compiler_set), len(build_types), len(variant_set))
for p in projs:
with testobj.subTest(msg="run all combinations at once", proj=p.proj):
p.run(args + ['--build-dir', bd,
'--install-dir', id,
p.run(args + ['--build-root', bd,
'--install-root', id,
'-c', ','.join([c.name if c.is_msvc else c.path for c in compiler_set]),
'-t', ','.join([str(b) for b in build_types]),
'-v', ','.join([v.full_specs for v in variant_set])
Expand All @@ -220,8 +220,8 @@ def run_projs(testobj, args, check_fn=None):
','.join([v.full_specs for v in variant_set])
)
#util.logwarn('export CMANY_ARGS={}'.format(os.environ['CMANY_ARGS']))
p.run(args + ['--build-dir', bd,
'--install-dir', id,
p.run(args + ['--build-root', bd,
'--install-root', id,
])
os.environ['CMANY_ARGS'] = ''
if check_fn:
Expand All @@ -242,8 +242,8 @@ def run_projs(testobj, args, check_fn=None):
proj=p.proj, compiler=c, build_type=t, variant=v):
bd = '.test/3.1--{}--{}--{}--build'.format(c, t, v.name)
id = '.test/3.1--{}--{}--{}--install'.format(c, t, v.name)
p.run(args + ['--build-dir', bd,
'--install-dir', id,
p.run(args + ['--build-root', bd,
'--install-root', id,
'-c', c.name if c.is_msvc else c.path,
'-t', str(t),
'-v', v.full_specs,
Expand All @@ -268,7 +268,7 @@ def run_projs(testobj, args, check_fn=None):
str(t),
v.full_specs)
#util.logwarn('export CMANY_ARGS={}'.format(os.environ['CMANY_ARGS']))
p.run(args + ['--build-dir', bd, '--install-dir', id])
p.run(args + ['--build-root', bd, '--install-root', id])
os.environ['CMANY_ARGS'] = ''
if check_fn:
tb = TestBuild(proj=p, buildroot=bd, installroot=id,
Expand Down

0 comments on commit 7ce02e6

Please sign in to comment.