Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (3)
...@@ -17,6 +17,11 @@ stages: ...@@ -17,6 +17,11 @@ stages:
script: script:
- ./cicd_testing/test-zafl-docker.sh - ./cicd_testing/test-zafl-docker.sh
test-zafl-docker-ubuntu20:
<<: *test-zafl-docker
tags:
- ubuntu20
test-zafl-docker-ubuntu18: test-zafl-docker-ubuntu18:
<<: *test-zafl-docker <<: *test-zafl-docker
tags: tags:
......
...@@ -6,12 +6,12 @@ env.Replace(debug=ARGUMENTS.get("debug",0)) ...@@ -6,12 +6,12 @@ env.Replace(debug=ARGUMENTS.get("debug",0))
env.Replace(autozafl=ARGUMENTS.get("autozafl",0)) env.Replace(autozafl=ARGUMENTS.get("autozafl",0))
if int(env['debug']) == 1: if int(env['debug']) == 1:
print "Setting debug mode" print("Setting debug mode")
env.Append(CFLAGS=" -g ") env.Append(CFLAGS=" -g ")
env.Append(CXXFLAGS=" -g ") env.Append(CXXFLAGS=" -g ")
env.Append(LINKFLAGS=" -g ") env.Append(LINKFLAGS=" -g ")
else: else:
print "Setting release mode" print("Setting release mode")
env.Append(CFLAGS=" -O3 ") env.Append(CFLAGS=" -O3 ")
env.Append(CXXFLAGS=" -O3 ") env.Append(CXXFLAGS=" -O3 ")
env.Append(LINKFLAGS=" -O3 ") env.Append(LINKFLAGS=" -O3 ")
......
...@@ -2,25 +2,12 @@ ...@@ -2,25 +2,12 @@
set -e set -e
set -x set -x
export ZAFL_PATH=git.zephyr-software.com:4567/opensrc/libzafl/ export ZAFL_PATH=git.zephyr-software.com:4567/opensrc/zafl/
export ZAFL_TAG=zafl:latest export ZAFL_TAG=zafl:latest
export DOCKER_ZAFL=${ZAFL_PATH}${ZAFL_TAG} export DOCKER_ZAFL=${ZAFL_PATH}${ZAFL_TAG}
do_login()
{
# login to gitlab's docker registry as gitlab-user
docker login $ZAFL_PATH -u gitlab-runner -p 84MyuSuDo4kQat4GZ_Zs 2> /dev/null
}
do_clean()
{
# rm -f *.deb
# scons -c
docker logout $ZAFL_PATH || true
}
do_test() do_test()
{ {
scons || exit 1 scons || exit 1
...@@ -35,7 +22,7 @@ do_test() ...@@ -35,7 +22,7 @@ do_test()
set -e set -e
local res2=$? local res2=$?
sudo apt-get remove libzafl -y sudo apt-get remove libzafl -y || true
if [[ $res1 != 0 ]] || [[ $res2 != 0 ]]; then if [[ $res1 != 0 ]] || [[ $res2 != 0 ]]; then
exit 1 exit 1
...@@ -47,10 +34,7 @@ do_test() ...@@ -47,10 +34,7 @@ do_test()
main() main()
{ {
do_clean
do_login
do_test do_test
do_clean
} }
main "$@" main "$@"
......
...@@ -11,14 +11,14 @@ minor_version = datetime.datetime.today().strftime('%Y.%m.%d') ...@@ -11,14 +11,14 @@ minor_version = datetime.datetime.today().strftime('%Y.%m.%d')
DEBNAME = "libzafl" DEBNAME = "libzafl"
p=subprocess.Popen(["cat", Dir('.').abspath + "/../MAJOR_VERSION"], stdout=subprocess.PIPE) p=subprocess.Popen(["cat", Dir('.').abspath + "/../MAJOR_VERSION"], stdout=subprocess.PIPE)
DEBVERSION = p.stdout.read().rstrip() DEBVERSION = p.stdout.read().rstrip().decode("utf-8")
p.wait() p.wait()
print 'DEBVERSION=' + DEBVERSION print('DEBVERSION=' + str(DEBVERSION))
DEBMAINT = "jdh8d@gmail.com" DEBMAINT = "jdh8d@gmail.com"
p=subprocess.Popen('/usr/bin/dpkg-architecture --list|grep DEB_HOST_ARCH=|sed \"s/.*=//\"', shell=True, stdout=subprocess.PIPE) p=subprocess.Popen('/usr/bin/dpkg-architecture --list|grep DEB_HOST_ARCH=|sed \"s/.*=//\"', shell=True, stdout=subprocess.PIPE)
DEBARCH = p.stdout.read().rstrip() DEBARCH = p.stdout.read().rstrip().decode("utf-8")
p.wait() p.wait()
print 'DEBARCH=' + DEBARCH print('DEBARCH=' + str(DEBARCH))
DEBDEPENDS = "libc6 " DEBDEPENDS = "libc6 "
DEBDESC = "A really cool utility" DEBDESC = "A really cool utility"
...@@ -78,8 +78,6 @@ env.Depends(DEBCONTROLFILE, env.Value(minor_version)) ...@@ -78,8 +78,6 @@ env.Depends(DEBCONTROLFILE, env.Value(minor_version))
def make_control(target=None, source=None, env=None): def make_control(target=None, source=None, env=None):
installed_size = 0 installed_size = 0
for i in DEBFILES: for i in DEBFILES:
#print 'in make_control with i='+str(i)
#print 'in make_control with env.File(i[1])='+str(env.File(i[1]))
installed_size += os.stat(str(env.File(i[1])))[6] installed_size += os.stat(str(env.File(i[1])))[6]
control_info = CONTROL_TEMPLATE % ( control_info = CONTROL_TEMPLATE % (
DEBNAME, installed_size, DEBMAINT, DEBARCH, DEBVERSION, DEBNAME, installed_size, DEBMAINT, DEBARCH, DEBVERSION,
......