Commit 597a8f05 authored by Jason Hiser's avatar Jason Hiser 🚜

added nightly testing

parent 1235bdad
Pipeline #2401 failed with stages
in 7 seconds
.sconsign.dblite
build/
*.o
.*.swp
*.os
*.so
*.exe
before_script:
- "source ~gitlab-runner/cicd_support/cicd_support.shinc"
after_script:
- "echo Test Complete."
stages:
- clean
- build
- test
#
# Cleaning
#
.do-nightly-clean: &do-nightly-clean
stage: clean
script:
- ./cicd_testing/do-clean.sh
# per os items
do-nightly-clean-ubuntu18:
<<: *do-nightly-clean
tags:
- ubuntu18
variables:
OS: 'ubuntu18'
# per os items
do-nightly-clean-ubuntu16:
<<: *do-nightly-clean
tags:
- ubuntu16
variables:
OS: 'ubuntu16'
# per os items
do-nightly-clean-centos75:
<<: *do-nightly-clean
tags:
- centos75
variables:
OS: 'centos75'
#
# Building
#
# template
.do-build: &do-build
stage: build
script:
- ./cicd_testing/do-build.sh
# per os items
do-build-ubuntu18:
<<: *do-build
tags:
- ubuntu18
variables:
OS: 'ubuntu18'
do-build-ubuntu16:
<<: *do-build
tags:
- ubuntu16
variables:
OS: 'ubuntu16'
do-build-centos75:
<<: *do-build
tags:
- centos75
variables:
OS: 'centos75'
#
# test_quick for EH handling
#
.basic-pgms-rida: &eh-tests
stage: test
script:
- ./cicd_testing/eh-tests.sh
eh-tests-ubuntu18:
<<: *eh-tests
tags:
- ubuntu18
eh-tests-ubuntu16:
<<: *eh-tests
tags:
- ubuntu16
eh-tests-centos75:
<<: *eh-tests
tags:
- centos75
#
# elfdep test
#
# template
.elfdep: &elfdep
stage: test
script:
- ./cicd_testing/elfdep.sh
elfdep-ubuntu18:
<<: *elfdep
tags:
- ubuntu18
variables:
OS: 'ubuntu18'
elfdep-ubuntu16:
<<: *elfdep
tags:
- ubuntu16
variables:
OS: 'ubuntu16'
elfdep-centos75:
<<: *elfdep
tags:
- centos75
variables:
OS: 'centos75'
#
# test_cmds.sh kill_deads
#
.basic-pgms-killdeads: &basic-pgms-killdeads
stage: test
script:
- ./cicd_testing/basic-pgms-killdeads.sh
basic-pgms-killdeads-ubuntu18:
<<: *basic-pgms-killdeads
tags:
- ubuntu18
basic-pgms-killdeads-ubuntu16:
<<: *basic-pgms-killdeads
tags:
- ubuntu16
basic-pgms-killdeads-centos75:
<<: *basic-pgms-killdeads
tags:
- centos75
variables:
OS: 'centos75'
import shutil
import os
import tarfile
Import('env')
(sysname, nodename, release, version, machine)=os.uname()
irdb_env=env.Clone()
irdb_env.Append(CXXFLAGS=" -std=c++11 -Wall -Werror -fmax-errors=2 ")
irdb_env.Append(LINKFLAGS=" -Wl,-unresolved-symbols=ignore-in-shared-libs ")
irdb_env['BASE_IRDB_LIBS']="irdb-core"
# pebliss requires iconv, which needs to be explicit on cygwin.
if "CYGWIN" in sysname:
# add tuple of 1 item!
irdb_env['BASE_IRDB_LIBS']=irdb_env['BASE_IRDB_LIBS']+("iconv",)
irdb_env['IRDB_INC']='''
$IRDB_SDK/include
$SECURITY_TRANSFORMS_HOME/include/
$SECURITY_TRANSFORMS_HOME/libEXEIO/include
$SECURITY_TRANSFORMS_HOME/libStructDiv/include
'''
Export('irdb_env')
dirs=Split("initialize_stack kill_deads stack_stamp")
libs = list()
for dir in dirs:
print "Doing " + dir
lib=irdb_env.SConscript(dir+"/SConscript", variant_dir='scons_build/'+dir)
libs = libs + lib
pedi = Command( target = "./testoutput",
source = "./SConscript",
action = "cd "+os.environ['SECURITY_TRANSFORMS_HOME']+" ; " +os.environ['PEDI_HOME']+"/pedi -m manifest.txt ; cd -" )
Depends(pedi,libs)
Default( pedi )
Return('pedi')
import os
import sys
(sysname, nodename, release, version, machine)=os.uname()
env=Environment()
# default build options
env.Replace(CFLAGS="-fPIC -Wall ")
env.Replace(CXXFLAGS="-fPIC -Wall ")
env.Replace(LINKFLAGS="-fPIC -Wall ")
# parse arguments
env.Replace(SECURITY_TRANSFORMS_HOME=os.environ['SECURITY_TRANSFORMS_HOME'])
env.Replace(IRDB_SDK=os.environ['IRDB_SDK'])
env.Replace(SMPSA_HOME=os.environ['SMPSA_HOME'])
env.Replace(IRDB_TRANSFORMS=os.environ['IRDB_TRANSFORMS'])
env.Replace(debug=ARGUMENTS.get("debug",0))
env.Append(LINKFLAGS=" -Wl,-unresolved-symbols=ignore-in-shared-libs ")
if int(env['debug']) == 1:
print "Setting debug mode"
env.Append(CFLAGS=" -g ")
env.Append(CXXFLAGS=" -g ")
env.Append(LINKFLAGS=" -g ")
env.Append(SHLINKFLAGS=" -g ")
else:
print "Setting release mode"
env.Append(CFLAGS=" -O3 ")
env.Append(CXXFLAGS=" -O3 ")
env.Append(LINKFLAGS=" -O3 ")
env.Append(SHLINKFLAGS=" -O3 ")
Export('env')
SConscript("SConscript", variant_dir='build')
#!/bin/bash
set -e
set -x
cd /tmp/cookbook_test
source set_env_vars
cd $PEASOUP_HOME/tests
make clean;
./test_cmds.sh -c kill_deads_rida -l -a "tcpdump"
./test_cmds.sh -c kill_deads -l -a "bzip2"
#!/bin/bash
set -e
set -x
# update submodules
git submodule sync --recursive
git submodule update --recursive --init
dir=$(pwd)
# gather info for debugging later, probably not necessary
pwd
hostname
whoami
env|grep CICD
time rsync -a --exclude='.git' $CICD_TO_TEST_DIR/ /tmp/cookbook_test
cd /tmp/cookbook_test
source set_env_vars
sudo ./get-peasoup-packages.sh all
./build-all.sh
bash ./postgres_setup.sh
cd $dir
scons
#!/bin/bash
set -e
set -x
main()
{
if [[ $CICD_NIGHTLY == 1 ]] ; then
# gather info for debugging later, probably not necessary
pwd
hostname
whoami
env|grep CICD
rm -rf /tmp/cookbook_test
fi
}
main "$@"
#!/bin/bash
set -e
set -x
cd /tmp/cookbook_test
source set_env_vars
cd $CICD_TO_TEST_DIR/examples/cpp-examples
./test_quick.sh
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment