Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zafl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source Software
zafl
Commits
c67806da
Commit
c67806da
authored
6 years ago
by
Anh Nguyen-Tuong
Browse files
Options
Downloads
Patches
Plain Diff
Test installer
parent
5cca3c1e
No related branches found
No related tags found
1 merge request
!4
Resolve "Add installer to cicd nightly tests"
Pipeline
#793
canceled
6 years ago
Stage: clean
Stage: build
Stage: test
Stage: install
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cicd_testing/installer.sh
+84
-5
84 additions, 5 deletions
cicd_testing/installer.sh
release/generate_release.sh
+1
-1
1 addition, 1 deletion
release/generate_release.sh
with
85 additions
and
6 deletions
cicd_testing/installer.sh
+
84
−
5
View file @
c67806da
...
@@ -2,10 +2,89 @@
...
@@ -2,10 +2,89 @@
set
-e
set
-e
set
-x
set
-x
cd
/tmp/zafl_test
ZAFL_INSTALL_TEST_DIR
=
/tmp/zafl_install_test.
$(
whoami
)
/
source
set_env_vars
cd
$ZAFL_HOME
/release
cleanup
()
{
rm
-fr
$ZAFL_INSTALL_TEST_DIR
}
log_error
()
{
echo
"Error:
$1
"
exit
1
}
sanity_check_bc
()
{
$ZAFL_HOME
/zfuzz/bin/zafl.sh
$(
which bc
)
bc.zafl
if
[
!
$?
-eq
0
]
;
then
log_error
"something went wrong trying to transform a binary with zafl instrumentation"
fi
if
[
!
-x
bc.zafl
]
;
then
log_error
"unable to produce a zafl-instrumented binary"
fi
# sanity check functionality
echo
"1+2"
| bc
>
bc.orig.out
echo
"1+2"
| ./bc.zafl
>
bc.zafl.out
diff bc.orig.out bc.zafl.out
if
[
!
$?
-eq
0
]
;
then
log_error
"output of bc differs between bc and bc.zafl"
fi
}
generate_release
()
{
cd
$ZAFL_HOME
/release
echo
"Generating releasing"
./generate_release.sh
}
install_release
()
{
# re-install from installer
if
[
!
-d
$ZAFL_INSTALL_TEST_DIR
]
;
then
mkdir
$ZAFL_INSTALL_TEST_DIR
fi
rm
-fr
$ZAFL_INSTALL_TEST_DIR
/
*
cp
$ZAFL_HOME
/release/zafl_install.tgz
$ZAFL_INSTALL_TEST_DIR
pushd
$ZAFL_INSTALL_TEST_DIR
tar
-xzvf
zafl_install.tgz
unset
ZAFL_HOME
unset
PEASOUP_HOME
unset
LD_LIBRARY_PATH
pushd
zafl_install
.
set_env_vars
echo
$PSZ
|
grep
zafl_install_test
if
[
!
$?
-eq
0
]
;
then
log_error
"env var PSZ does not point into installer directory"
fi
echo
$ZAFL_HOME
|
grep
zafl_install_test
if
[
!
$?
-eq
0
]
;
then
log_error
"env var ZAFL_HOME does not point into installer directory"
fi
}
# generate and sanity check installer
#cd /tmp/zafl_test
#source set_env_vars
generate_release
install_release
# sanity test using basic calculator
sanity_check_bc
cleanup
echo
"Generating releasing"
./generate_release.sh
This diff is collapsed.
Click to expand it.
release/generate_release.sh
+
1
−
1
View file @
c67806da
...
@@ -47,7 +47,7 @@ main()
...
@@ -47,7 +47,7 @@ main()
cp
-r
$ZAFL_HOME
/install/zfuzz
$zaflinstalldir
cp
-r
$ZAFL_HOME
/install/zfuzz
$zaflinstalldir
cp
-r
$ZAFL_HOME
/install/set_env_vars
$zaflinstalldir
cp
-r
$ZAFL_HOME
/install/set_env_vars
$zaflinstalldir
echo
"Creating installation archive"
echo
"Creating installation archive"
tar
czf zafl.tgz zafl_install
tar
czf zafl
_install
.tgz zafl_install
echo
"Cleaning up"
echo
"Cleaning up"
post_cleanup
post_cleanup
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment