Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
R
regression-tests
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OPAL
regression-tests
Commits
058585dc
Commit
058585dc
authored
Mar 24, 2017
by
gsell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scripts to run test added, see issue
#23
parent
d970626a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
196 additions
and
0 deletions
+196
-0
.gitignore
.gitignore
+1
-0
scripts/regression_tests.conf
scripts/regression_tests.conf
+51
-0
scripts/run_regression_tests
scripts/run_regression_tests
+144
-0
No files found.
.gitignore
View file @
058585dc
# use >git clean -f to get rid of all untracked files
.keytab
*~
*.pyc
*.png
...
...
scripts/regression_tests.conf
0 → 100644
View file @
058585dc
#!/bin/bash
declare
-
rx
OPAL_VERSION
=
1
.
5
declare
-
r
PRINCIPAL_NAME
=
'svcusr-amas_regr'
declare
tests
=
''
tests
+=
"BeamLine-1,"
tests
+=
"BeamLine-2,"
tests
+=
"CSRBendDrift,"
tests
+=
"DCGun-Cornell-1,"
tests
+=
"DCGun-Cornell-2,"
tests
+=
"Degrader-1,"
tests
+=
"Distribution-Binomial-1,"
tests
+=
"Distribution-Gauss-1,"
tests
+=
"Distribution-Gauss-2,"
tests
+=
"EGunCTF3-1,"
tests
+=
"EGunCTF3-2,"
tests
+=
"Envelope-Tracker-Phase1,"
tests
+=
"ExternalFieldTest,"
tests
+=
"HKick-Test-1,"
tests
+=
"Kick-Test-1,"
tests
+=
"OpalRingTest,"
tests
+=
"PROSCAN-1,"
tests
+=
"PROSCAN-2,"
tests
+=
"PSIGUN-1,"
tests
+=
"PerfectDiode,"
tests
+=
"Quad-Simple-Test-1,"
tests
+=
"RBend-Simple-Test-1,"
tests
+=
"RBend-Simple-Test-2,"
tests
+=
"RBend-Simple-Test-3,"
tests
+=
"RBend-Simple-Test-4,"
tests
+=
"RestartTest-1,"
tests
+=
"RestartTest-2,"
tests
+=
"RestartTest-3,"
tests
+=
"RestartTest-4,"
tests
+=
"RestartTest-5,"
tests
+=
"RestartTest-6,"
tests
+=
"RestartTest-7,"
tests
+=
"RestartTest-8,"
tests
+=
"RingCyclotron,"
tests
+=
"RingCyclotronMTS,"
tests
+=
"RingCyclotronMatched,"
tests
+=
"SAAMG-Test-1,"
tests
+=
"SBend-Simple-Test-1,"
tests
+=
"SBend-Simple-Test-2,"
tests
+=
"SBend-Simple-Test-3,"
tests
+=
"SBend-Simple-Test-4,"
tests
+=
"Scan-1,"
tests
+=
"VKick-Test-1,"
tests
+=
"opalimpact-1"
scripts/run_regression_tests
0 → 100755
View file @
058585dc
#!/bin/bash
# for Macports
# :FIXME: do we need this?
# YES: as long as readlink(1) shipped with Mac OS X does not
# support the option '-f'
PATH+
=
":/opt/local/bin:/usr/local/bin"
# for Mac OS
declare
-rx
MACOSX_DEPLOYMENT_TARGET
=
10.9
#exec 1> $0.stdout
#exec 2> $0.stderr
declare
-r
abs_scriptname
=
$(
readlink
-f
"
$0
"
)
declare
-r
bindir
=
"
${
abs_scriptname
%/*
}
"
declare
-r
basedir
=
"
${
bindir
%/*/*
}
"
declare
-r
builddir
=
"
${
basedir
}
/build"
declare
-r
opalbin
=
"
${
builddir
}
/src/opal"
declare
-r
srcdir
=
"
${
basedir
}
/src"
declare
-r
testsdir
=
"
${
basedir
}
/tests"
declare
-r
keytab
=
"
${
bindir
}
/.keytab"
# read configuration and tests to run
source
"
${
bindir
}
/regression_tests.conf"
# these shell variables must be set for the tests
declare
-rx
REGTEST_WWW
=
'/afs/psi.ch/project/amas/webhosting/opal/regressionTests/${OPAL_VERSION}'
declare
-rx
OPAL_EXE_PATH
=
"
${
basedir
}
/build/src"
declare
-r
run_tests
=
"
${
basedir
}
/tests/RegressionTests/run/run-reg-tests.py"
#
declare
force_run
=
'no'
declare
new_opal_binary
=
'no'
while
((
$#
>
0
))
;
do
case
$1
in
-f
|
--force
)
force_run
=
'yes'
;;
-
*
)
echo
"Unknown option:
$1
"
1>&2
exit
;;
*
)
echo
"No arguments allowed"
1>&2
exit
1
;;
esac
shift
1
done
load_modules
()
{
source
/opt/psi/config/profile.bash
module purge
module use unstable
module load git/2.3.3
module load cmake/3.6.3
module load gcc/5.4.0
module load openmpi/1.10.4
module load boost/1.62.0
module load hdf5/1.8.18
module load H5hut/2.0.0rc3
module load gsl/2.2.1
module load trilinos/12.10.1
module load OpenBLAS/0.2.19
}
update_repo
()
{
local
-r
repodir
=
"
$1
"
if
[[
-z
"
${
repodir
}
"
]]
;
then
echo
"
$0
: Missing argument!"
1>&2
exit
1
fi
if
[[
!
-d
"
${
repodir
}
"
]]
;
then
echo
"
${
repodir
}
: does not exist or is not a directory!"
1>&2
exit
1
fi
cd
"
${
repodir
}
"
if
!
git rev-parse
--is-inside-work-tree
1>/dev/null 2>&1
;
then
echo
"
${
repodir
}
: is not a Git working directory!"
1>&2
exit
1
fi
local
-r
branch
=
$(
git rev-parse
--abbrev-ref
HEAD
)
git fetch
||
{
echo
"git fetch failed!"
1>&2
;
exit
10
;
}
local
-i
num_changed_files
=
$(
git diff
--name-only
"origin/
${
branch
}
"
|
wc
-l
|
awk
'{print $1}'
)
if
((
$num_changed_files
==
0
))
;
then
echo
"Working directory '
${
repodir
}
' is up to date!"
return
1
fi
git merge
||
{
echo
"git merge failed!"
1>&2
;
exit
11
;
}
;
return
0
}
compile_opal
()
{
cd
"
${
basedir
}
"
||
exit
1
rm
-rf
"
${
builddir
}
"
||
exit
1
mkdir
"
${
builddir
}
"
||
exit
1
cd
"
${
builddir
}
"
||
exit
1
cmake
-DCMAKE_BUILD_TYPE
=
RELEASE
-DENABLE_SAAMG_SOLVER
=
TRUE
"
${
srcdir
}
"
make
-j10
||
exit
1
}
run_regressiontests
()
{
declare
-rx
KRB5CCNAME
=
$(
mktemp
/tmp/krb5cc_
$(
id
-u
)
_XXXXXX
)
/usr/bin/kinit
-t
"
${
keytab
}
"
-k
"
${
PRINCIPAL_NAME
}
"
||
exit
2
/usr/bin/aklog
||
exit
2
"
${
run_tests
}
"
--user
--run-local
--tests
=
"
${
tests
}
"
/usr/bin/unlog
/usr/bin/kdestroy
}
main
()
{
echo
"Updating OPAL source repository..."
update_repo
"
${
srcdir
}
"
if
[[
$?
==
0
]]
||
[[
!
-e
"
${
opalbin
}
"
]]
;
then
echo
"Compiling OPAL ..."
compile_opal
||
exit
1
new_opal_binary
=
'yes'
fi
echo
"Updating test repository..."
update_repo
"
${
testsdir
}
"
if
[[
$?
==
0
]]
||
[[
${
new_opal_binary
}
==
'yes'
]]
||
[[
${
force_run
}
==
'yes'
]]
;
then
echo
"Running regression tests..."
run_regressiontests
||
exit
1
fi
}
load_modules
main
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment