Skip to content

Commit

Permalink
classify success case in failure-case as failed.
Browse files Browse the repository at this point in the history
  • Loading branch information
syoyo committed Oct 24, 2023
1 parent a6675b2 commit 237a7be
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/usdc/unit-runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument("--basedir", type=str, default="tests/usdc")
parser.add_argument("--app", type=str, default="./build/simple_usdz_dump")
parser.add_argument("--app", type=str, default="./build/test_tinyusdz")
args = parser.parse_args()

app = args.app

failed = []
false_negatives = []
#false_negatives = []

print("Basedir: ", args.basedir)
print("App: ", args.app)
Expand All @@ -32,12 +32,12 @@
cnt += 1

# failure expected
for fname in glob.glob(os.path.join(args.basedir, "fail-case/*.usdc")):
for fname in glob.glob(os.path.join(args.basedir, "failure-case/*.usdc")):
cmd = [app, fname]

ret = subprocess.call(cmd)
if ret == 0:
false_negatives.append(fname)
failed.append(fname)

cnt += 1

Expand All @@ -48,9 +48,9 @@
# failed
print("ERROR: parse failed for : ", fname)

if len(false_negatives) > 0:
for fname in false_negatives:
print("WARN: parse should fail but reported success : ", fname)
#if len(false_negatives) > 0:
# for fname in false_negatives:
# print("WARN: parse should fail but reported success : ", fname)

print("Tested {} USDC files.".format(cnt))

Expand Down

0 comments on commit 237a7be

Please sign in to comment.