Skip to content

Commit

Permalink
Build update
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Zeithaml <[email protected]>
  • Loading branch information
Martin-Zeithaml committed Oct 8, 2024
1 parent 1fa6dd2 commit e5d72d7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
4 changes: 3 additions & 1 deletion build/build_cmgr_xlclang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ rm -rf "${TMP_DIR}"

if [ "${1}" = "--test" ]; then
if [ -f "${COMMON}/bin/configmgr" ]; then
"${COMMON}/bin/configmgr" -script "${COMMON}/tests/quickJS/quickJS.js"
cd "${COMMON}/tests/quickJS/"
./run_test.sh
cd "${WORKING_DIR}"
echo
fi
fi
Expand Down
4 changes: 2 additions & 2 deletions tests/quickJS/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#######################################################################

if [ `uname` != "OS/390" ]; then
echo "This test must run on a z/OS system."
echo "Error: this test must run on a z/OS system."
exit 1
fi

Expand All @@ -32,6 +32,6 @@ fi
if [ -f "${configmgr_path}" ]; then
"${configmgr_path}" -script ./quickJS.js
else
echo "configmgr not found in '${configmgr_path}'"
echo "Error: configmgr not found in '${configmgr_path}'"
exit 4
fi
22 changes: 12 additions & 10 deletions tests/quickJS/testLib/testZos.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import * as test from '../lib/test';

export function test_changeTag() {
let errs;
const FAILS = [ ...test.CLASSIC_FAILS,
const FAILS = [ ...test.CLASSIC_FAILS,
'./file, which does not exit', ['./file, which does not exit', 250000 ],
]
const FINES = [
Expand All @@ -36,19 +36,21 @@ export function test_changeTag() {
}


// int status = changeExtendedAttributes(pathname, extattr, onOffInt ? true : false);
export function test_changeExtAttr() {
const result = zos.changeExtAttr('./');
print.purple(`DUMMY TEST: zos.changeExtAttr(./)=${result}`);
return { errors: 0, total: 0 }
const FINES = [
['./testLib/hello.txt', zos.EXTATTR_PROGCTL, true ],
['./testLib/hello.txt', zos.EXTATTR_PROGCTL, false ],
]
let errs = test.process(zos.changeExtAttr, test.CLASSIC_FAILS, -1, 'zos.changeExtAttr');
errs += test.process(zos.changeExtAttr, FINES, 0, 'zos.changeExtAttr');
return { errors: errs, total: test.CLASSIC_FAILS.length + FINES.length }
}


// int status = convertOpenStream(fd, ccsid);
export function test_changeStreamCCSID() {
const result = zos.changeStreamCCSID('./');
print.purple(`DUMMY TEST: zos.changeStreamCCSID(./)=${result}`);
return { errors: 0, total: 0 }
const FAILS = [ -2, -1, 999999999, 1024*1024 ];
const errs = test.process(zos.changeStreamCCSID, FAILS, -1, 'zos.changeStreamCCSID');
return { errors: errs, total: FAILS.length }
}


Expand All @@ -64,7 +66,7 @@ export function test_zstat() {
const result = zos.zstat(FINES[f]);
errs += print.conditionally(result[1] == 0, 'zos.zstat', FINES[f], result);
}
return { errors: errs, total: FAILS.length }
return { errors: errs, total: FAILS.length + FINES.length }
}


Expand Down

0 comments on commit e5d72d7

Please sign in to comment.