Skip to content
Extraits de code Groupes Projets
Vérifiée Valider a41943e4 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

CI: Snake-case the CI file, add a really basic test

parent 762c07a6
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!105Refactor and more
stages:
- Initialization
- Configures
- Builds
- Finalization
- initialization
- configure
- build
- test
- finalization
.main_tests: &main_tests
tags:
......@@ -18,16 +19,16 @@ stages:
### Initialization and Finalization #############
#################################################
Env Sanitize:
env_sanitize:
<<: *main_tests
stage: Initialization
stage: initialization
script:
- mkdir -p $HOME/$CI_PIPELINE_ID/{build.clang,build.gcc,install.clang,install.gcc}
- echo "Env is intialized"
Env Finalize:
env_finalize:
<<: *main_tests
stage: Finalization
stage: finalization
allow_failure: true
when: always
script:
......@@ -37,16 +38,16 @@ Env Finalize:
### Configures ##################################
#################################################
Configure with gcc:
configure_gcc:
<<: *main_tests
stage: Configures
stage: configure
script:
- cd $HOME/$CI_PIPELINE_ID/
- scripts/validate.bash --compiler=clang --debug --static-modules --step=configure
Configure with clang:
configure_clang:
<<: *main_tests
stage: Configures
stage: configure
script:
- cd $HOME/$CI_PIPELINE_ID/
- scripts/validate.bash --compiler=clang --debug --static-modules --step=configure
......@@ -55,16 +56,27 @@ Configure with clang:
### Builds ######################################
#################################################
Build with gcc:
build_gcc:
<<: *main_tests
stage: Builds
stage: build
script:
- cd $HOME/$CI_PIPELINE_ID/
- scripts/validate.bash --compiler=gcc --step=build
Build with clang:
build_clang:
<<: *main_tests
stage: Builds
stage: build
script:
- cd $HOME/$CI_PIPELINE_ID/build.clang
- scripts/validate.bash --compiler=clang --step=build
#################################################
### Tests #######################################
#################################################
test_basic:
<<: *main_tests
stage: test
script:
- cd $HOME/$CI_PIPELINE_ID/build.clang
- scripts/validate.bash --compiler=clang --step=launch --test=simple
......@@ -15,6 +15,18 @@ LKT_CONFIGURE_OPTIONS="" # Options to pass to the configure command
LKT_CORE_NUMBER=4 # Number of cores to use with make
LKT_TEST="" # Which tests to perform
### AVAILABLE TESTS ##########################################################
function test_simple ()
{
check_cd $LKT_DIR/install.$LKT_COMPILER/
./lektord &
local _child_pid=$!
./lkt pwd=hashire adm kil
sleep 5
kill $_child_pid
}
### Utility functions ########################################################
function die ()
{
......@@ -121,7 +133,12 @@ function do_steps ()
function do_launch ()
{
check_cd $LKT_DIR
die "No test available"
for test in $LKT_TEST ; do
case "$test" in
simple) test_simple;;
*) die "Test not available"
esac
done
}
### PROCESS ARGS #############################################################
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter