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: stages:
- Initialization - initialization
- Configures - configure
- Builds - build
- Finalization - test
- finalization
.main_tests: &main_tests .main_tests: &main_tests
tags: tags:
...@@ -18,16 +19,16 @@ stages: ...@@ -18,16 +19,16 @@ stages:
### Initialization and Finalization ############# ### Initialization and Finalization #############
################################################# #################################################
Env Sanitize: env_sanitize:
<<: *main_tests <<: *main_tests
stage: Initialization stage: initialization
script: script:
- mkdir -p $HOME/$CI_PIPELINE_ID/{build.clang,build.gcc,install.clang,install.gcc} - mkdir -p $HOME/$CI_PIPELINE_ID/{build.clang,build.gcc,install.clang,install.gcc}
- echo "Env is intialized" - echo "Env is intialized"
Env Finalize: env_finalize:
<<: *main_tests <<: *main_tests
stage: Finalization stage: finalization
allow_failure: true allow_failure: true
when: always when: always
script: script:
...@@ -37,16 +38,16 @@ Env Finalize: ...@@ -37,16 +38,16 @@ Env Finalize:
### Configures ################################## ### Configures ##################################
################################################# #################################################
Configure with gcc: configure_gcc:
<<: *main_tests <<: *main_tests
stage: Configures stage: configure
script: script:
- cd $HOME/$CI_PIPELINE_ID/ - cd $HOME/$CI_PIPELINE_ID/
- scripts/validate.bash --compiler=clang --debug --static-modules --step=configure - scripts/validate.bash --compiler=clang --debug --static-modules --step=configure
Configure with clang: configure_clang:
<<: *main_tests <<: *main_tests
stage: Configures stage: configure
script: script:
- cd $HOME/$CI_PIPELINE_ID/ - cd $HOME/$CI_PIPELINE_ID/
- scripts/validate.bash --compiler=clang --debug --static-modules --step=configure - scripts/validate.bash --compiler=clang --debug --static-modules --step=configure
...@@ -55,16 +56,27 @@ Configure with clang: ...@@ -55,16 +56,27 @@ Configure with clang:
### Builds ###################################### ### Builds ######################################
################################################# #################################################
Build with gcc: build_gcc:
<<: *main_tests <<: *main_tests
stage: Builds stage: build
script: script:
- cd $HOME/$CI_PIPELINE_ID/ - cd $HOME/$CI_PIPELINE_ID/
- scripts/validate.bash --compiler=gcc --step=build - scripts/validate.bash --compiler=gcc --step=build
Build with clang: build_clang:
<<: *main_tests <<: *main_tests
stage: Builds stage: build
script: script:
- cd $HOME/$CI_PIPELINE_ID/build.clang - cd $HOME/$CI_PIPELINE_ID/build.clang
- scripts/validate.bash --compiler=clang --step=build - 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 ...@@ -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_CORE_NUMBER=4 # Number of cores to use with make
LKT_TEST="" # Which tests to perform 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 ######################################################## ### Utility functions ########################################################
function die () function die ()
{ {
...@@ -121,7 +133,12 @@ function do_steps () ...@@ -121,7 +133,12 @@ function do_steps ()
function do_launch () function do_launch ()
{ {
check_cd $LKT_DIR 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 ############################################################# ### 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