Skip to content
Snippets Groups Projects
Commit aa58e0ed authored by an7s's avatar an7s
Browse files

Work on installer for Strata

Former-commit-id: 4bf213e7c9ec54f8aab231d259cd337b56d9a3e6
parent 14373dbd
No related branches found
No related tags found
No related merge requests found
......@@ -30,20 +30,15 @@
#
USER=$1 # not used yet
PROG=$2 # cat
JOBID=$3 # 1324
USER=$1 # user name
PROG=$2 # cat_1324
JOBID=$3 # cat.1324
ANALYSIS_DIR=$4 # fully-qualified path for peasoup_executable_directory_XXX
USER_DOWNLOAD_DIR=/tmp/zest/$USER/download
INSTALLER_SCRIPT=$PROG.install.sh
INSTALLER="/download/$JOBID.tgz"
# scrub the peasoup directory before making a tarball
$PEASOUP_HOME/tools/ps_scrub.sh $ANALYSIS_DIR
# tarball format:
# cat.installer/cat.install.sh
# cat.installer/peasoup_executable_directory_XXX
......@@ -52,6 +47,9 @@ INSTALLER_DIR=$PROG.installer
mkdir -p $USER_DOWNLOAD_DIR/$INSTALLER_DIR 2>/dev/null
# scrub the peasoup directory before making a tarball
$PEASOUP_HOME/tools/ps_scrub.sh $ANALYSIS_DIR
# get rid of any previous tarballs
cd $USER_DOWNLOAD_DIR/$INSTALLER_DIR
rm -fr *.tar *.tgz *peasoup* *instal* *analysis*
......@@ -64,9 +62,7 @@ ln -s $ANALYSIS_DIR analysis_dir
# make the tarball
cd $USER_DOWNLOAD_DIR
tar -hcvf $JOBID.tar $INSTALLER_DIR
gzip $JOBID.tar
mv $JOBID.tar.gz $JOBID.tgz
tar -hcvf $PROG.tar $INSTALLER_DIR
gzip $PROG.tar
mv $PROG.tar.gz $PROG.tgz
# update the database
$PEASOUP_HOME/tools/db/job_spec_update_installer.sh $JOBID $INSTALLER
......@@ -736,7 +736,7 @@ fi
#
# record the new program's name
#
export stratafied_exe=$1
export protected_exe=$1
shift
#
......@@ -805,7 +805,7 @@ adjust_lib_path
# make sure we overwrite out output file one way or another
rm -f $stratafied_exe
rm -f $protected_exe
# and switch to that dir
cd $newdir
......@@ -882,8 +882,8 @@ perform_step concolic none $PEASOUP_HOME/tools/do_concolic.sh a -z $PEASOUP_UMBR
# get some simple info for the program
#
if [ -z $DB_PROGRAM_NAME ]; then
DB_PROGRAM_NAME=`basename $orig_exe.$$ | sed "s/[^a-zA-Z0-9]/_/g"`
DB_PROGRAM_NAME="psprog_$DB_PROGRAM_NAME"
# DB_PROGRAM_NAME=`basename $orig_exe | sed "s/[^a-zA-Z0-9]/_/g"`
DB_PROGRAM_NAME=`basename $protected_exe | sed "s/[^a-zA-Z0-9]/_/g"`
fi
MD5HASH=`$PS_MD5SUM $newname.ncexe | cut -f1 -d' '`
......@@ -991,7 +991,7 @@ fi
#
# Run script to setup manual tests
#
perform_step manual_test none $PEASOUP_HOME/tools/do_manualtests.sh $name $stratafied_exe $manual_test_script $manual_test_coverage_file
perform_step manual_test none $PEASOUP_HOME/tools/do_manualtests.sh $name $protected_exe $manual_test_script $manual_test_coverage_file
#
# remove the parts of the annotation file not needed at runtime
......@@ -1129,7 +1129,7 @@ else
fi
# copy output file into requested location.
cp $my_outfile $stratafied_exe
cp $my_outfile $protected_exe
cd $newdir
......@@ -1137,7 +1137,8 @@ cd $newdir
python $PEASOUP_HOME/tools/gather_stats.py logs/*.log > logs/stats.json
# make sure we only do this once there are no more updates to the peasoup_dir
perform_step installer none $PEASOUP_HOME/tools/do_installer.sh $USER $DB_PROGRAM_NAME $JOBID $PWD
perform_step installer none $PEASOUP_HOME/tools/do_installer.sh $USER $DB_PROGRAM_NAME $JOBID $PWD $step_options_installer
cd - > /dev/null 2>&1
......@@ -1151,7 +1152,7 @@ check_steps_completed
#
# return success if we created a script to invoke the pgm and zipr is off.
#
if [ -f $stratafied_exe ]; then
if [ -f $protected_exe ]; then
if [ $errors = 1 ]; then
echo
echo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment