remove some custom logic in testament around flags, testExec (#18090)

* remove some custom logic in testament around flags, testExec

* remove testExec, custom logic around flags from testament

* fixup
This commit is contained in:
Timothee Cour 2021-05-26 00:41:50 -07:00 • committed by GitHub
commit b59dc3b255
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 48 deletions

View file

@ -621,22 +621,6 @@ proc testC(r: var TResults, test: TTest, action: TTestAction) =
if exitCode != 0: given.err = reExitcodesDiffer
if given.err == reSuccess: inc(r.passed)
proc testExec(r: var TResults, test: TTest) =
# runs executable or script, just goes by exit code
if not checkDisabled(r, test): return
inc(r.total)
let (outp, errC) = execCmdEx(test.options.strip())
var given: TSpec
if errC == 0:
given.err = reSuccess
else:
given.err = reExitcodesDiffer
given.msg = outp
if given.err == reSuccess: inc(r.passed)
r.addResult(test, targetC, "", given.msg, given.err)
proc makeTest(test, options: string, cat: Category): TTest =
result.cat = cat
result.name = test