generated from usnistgov/opensource-repo
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from usnistgov/py10
Upgrade to Python 3.10 and MongoDB 7.0 (see PR# 13)
- Loading branch information
Showing
35 changed files
with
155 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,20 @@ | ||
#! /bin/bash | ||
# | ||
mongod_ctl=/usr/local/bin/mongod_ctl.sh | ||
[ "$1" = "" ] && exec /bin/bash | ||
|
||
function install { | ||
scripts/install.sh --prefix=/app/pdr || return 1 | ||
export OAR_HOME=/app/pdr | ||
export PYTHONPATH=$OAR_HOME/lib/python | ||
export OAR_LOG_DIR=$OAR_HOME/var/logs | ||
} | ||
|
||
function exitopwith { | ||
echo $2 > $1.exit | ||
exit $2 | ||
} | ||
|
||
cmd=$1 | ||
case "$1" in | ||
makedist) | ||
shift | ||
scripts/makedist "$@" | ||
;; | ||
testall) | ||
install || { | ||
echo "testall: Failed to install oar-pdr-py" | ||
exitopwith testall 2 | ||
} | ||
shift | ||
scripts/testall "$@"; stat=$? | ||
|
||
[ "$stat" != "0" ] && { | ||
echo "testall: One or more tests failed (last=$stat)" | ||
exitopwith testall 3 | ||
} | ||
|
||
echo All python tests passed | ||
;; | ||
install) | ||
install | ||
python -c 'import nistoar.pdr, jq' | ||
;; | ||
testshell) | ||
# libdir=`ls /dev/oar-pdr-py/python/build | grep lib.` | ||
export OAR_PYTHONPATH=/dev/oar-pdr-py/python/build/lib | ||
export OAR_JQ_LIB=/dev/oar-pdr-py/metadata/jq | ||
export OAR_MERGE_ETC=/dev/oar-pdr-py/metadata/etc/merge | ||
export OAR_SCHEMA_DIR=/dev/oar-pdr-py/metadata/model | ||
export PYTHONPATH=$OAR_PYTHONPATH | ||
exec /bin/bash | ||
;; | ||
shell) | ||
exec /bin/bash | ||
;; | ||
installshell) | ||
install | ||
exec /bin/bash | ||
testall|testshell) | ||
[ -x $mongo_ctl ] && $mongod_ctl start && sleep 1 | ||
exec /usr/local/bin/gosu developer /usr/local/bin/runtests.sh $@ | ||
;; | ||
*) | ||
echo Unknown command: $1 | ||
echo Available commands: makedist testall testshell install shell installshell testmdservshell testpreserveshell | ||
exec /usr/local/bin/gosu developer /usr/local/bin/runtests.sh $@ | ||
;; | ||
esac | ||
|
||
[ $? -ne 0 ] && exitopwith $cmd 1 | ||
true | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#! /bin/bash | ||
# | ||
function install { | ||
scripts/setversion.sh | ||
scripts/install.sh --prefix=/app/pdr || return 1 | ||
export OAR_HOME=/app/pdr | ||
export PYTHONPATH=$OAR_HOME/lib/python | ||
export OAR_LOG_DIR=$OAR_HOME/var/logs | ||
} | ||
|
||
function exitopwith { | ||
echo $2 > $1.exit | ||
exit $2 | ||
} | ||
|
||
|
||
|
||
cmd=$1 | ||
case "$1" in | ||
makedist) | ||
shift | ||
scripts/makedist "$@" | ||
EXCODE=$? | ||
;; | ||
build) | ||
scripts/setversion.sh | ||
(cd python && python setup.py build) | ||
EXCODE=$? | ||
;; | ||
testall) | ||
install || { | ||
echo "testall: Failed to install oar-pdr-py" | ||
exitopwith testall 2 | ||
} | ||
shift | ||
|
||
# wrapper root shell should have already started mongodb | ||
stat=0 | ||
scripts/testall "$@"; stat=$? | ||
|
||
[ "$stat" != "0" ] && { | ||
echo "testall: One or more test packages failed (last=$stat)" | ||
echo NOT OK | ||
exitopwith testall 3 | ||
} | ||
# echo All OK | ||
EXCODE=$stat | ||
;; | ||
install) | ||
install | ||
python -c 'import nistoar.pdr, jq' | ||
EXCODE=$? | ||
;; | ||
testshell) | ||
# wrapper root shell should have already started mongodb | ||
install | ||
exec /bin/bash | ||
;; | ||
shell) | ||
exec /bin/bash | ||
;; | ||
*) | ||
echo Unknown command: $1 | ||
echo Available commands: build makedist testall install shell | ||
EXCODE=100 | ||
;; | ||
esac | ||
|
||
echo $EXCODE > $cmd.exit | ||
exit $EXCODE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule metadata
updated
13 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.