Skip to content

Commit

Permalink
Merge pull request #348 from jpwhite4/test_tests
Browse files Browse the repository at this point in the history
Update CI build to run the etl mapping tests.
  • Loading branch information
jpwhite4 authored Aug 31, 2023
2 parents 4abddf9 + 3555ad1 commit f94c1c3
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
],
"exclude_patterns": [
"#/\\.#",
"#/open_xdmod/modules/supremm/tests#"
"#/open_xdmod/modules/supremm/tests#",
"#/open_xdmod/modules/supremm/etl/js/config/supremm/tests#"
]
},
"commands": {
Expand Down
12 changes: 12 additions & 0 deletions etl/js/config/supremm/tests/pcp/expected/4655275-1445928790.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,18 @@
"value": 0,
"error": 0
},
"gpus": {
"value": 0,
"error": 8
},
"gpu_time": {
"value": null,
"error": 8
},
"gpu_usage": {
"value": null,
"error": 8
},
"gpu_energy": {
"value": null,
"error": 2
Expand Down
12 changes: 12 additions & 0 deletions etl/js/config/supremm/tests/pcp/expected/4843309-1546457856.json
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,18 @@
"value": null,
"error": 8
},
"gpus": {
"value": 0,
"error": 8
},
"gpu_time": {
"value": null,
"error": 8
},
"gpu_usage": {
"value": null,
"error": 8
},
"gpu_energy": {
"value": 657403.674388661,
"error": 0
Expand Down
12 changes: 12 additions & 0 deletions etl/js/config/supremm/tests/pcp/expected/5659085-1469572318.json
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,18 @@
"value": 0,
"error": 0
},
"gpus": {
"value": 0,
"error": 8
},
"gpu_time": {
"value": null,
"error": 8
},
"gpu_usage": {
"value": null,
"error": 8
},
"gpu_energy": {
"value": null,
"error": 2
Expand Down
12 changes: 12 additions & 0 deletions etl/js/config/supremm/tests/pcp/expected/719452-1470861674.json
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,18 @@
"value": null,
"error": 8
},
"gpus": {
"value": 0,
"error": 8
},
"gpu_time": {
"value": null,
"error": 8
},
"gpu_usage": {
"value": null,
"error": 8
},
"gpu_energy": {
"value": null,
"error": 2
Expand Down
12 changes: 12 additions & 0 deletions etl/js/config/supremm/tests/pcp/expected/8291026-1518721536.json
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,18 @@
"value": null,
"error": 8
},
"gpus": {
"value": 0,
"error": 8
},
"gpu_time": {
"value": null,
"error": 8
},
"gpu_usage": {
"value": null,
"error": 8
},
"gpu_energy": {
"value": null,
"error": 2
Expand Down
14 changes: 13 additions & 1 deletion tests/ci/scripts/post-install-test.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
#!/usr/bin/env bash

XDMOD_ETC_DIR="${XDMOD_ETC_DIR:-/etc/xdmod}"

post_install_exit_value=0

echo "Copy ETL Test Artifacts"

mv $XDMOD_ETC_DIR/supremm_resources.json $XDMOD_ETC_DIR/supremm_resources.json_post_install_test
cp ./configuration/supremm_resources.json $XDMOD_ETC_DIR
rsync -av ./etl/js/config/supremm/tests/ $XDMOD_INSTALL_DIR/etl/js/config/supremm/tests/

echo "Testing ETL configs..."
pushd "$XDMOD_INSTALL_DIR" >/dev/null || exit 2
node etl/js/etl.cli.js -t
node etl/js/etl.cli.js -t -d
if [ $? != 0 ]; then
post_install_exit_value=2
fi

# revert changes to supremm_resource.json
mv $XDMOD_ETC_DIR/supremm_resources.json_post_install_test $XDMOD_ETC_DIR/supremm_resources.json

for file in etl/js/config/supremm/unit_test/*.js;
do
node $file
Expand Down

0 comments on commit f94c1c3

Please sign in to comment.