Skip to content

Commit

Permalink
Add pure CMake tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LecrisUT committed Oct 2, 2024
1 parent acc10a1 commit d35e734
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions .fmf/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
4 changes: 4 additions & 0 deletions tests/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
path: /
test: ./tests/test_pure_cmake.sh
framework: beakerlib
tag: [ cmake ]
1 change: 1 addition & 0 deletions tests/packages/multiple_packages/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
summary: Multiple packages
1 change: 1 addition & 0 deletions tests/packages/simple/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
summary: Simplest project
23 changes: 23 additions & 0 deletions tests/test_pure_cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# shellcheck disable=all
. /usr/share/beakerlib/beakerlib.sh || exit 1

rlJournalStart
rlPhaseStartSetup
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
rlRun "root=\$(pwd)" 0 "Save the tmt root path"
rlRun "pushd $tmp"
rlRun "set -o pipefail"
rlPhaseEnd

rlPhaseStartTest
rlRun "cmake -S $root$TMT_TEST_NAME -B ./build" 0 "Configure project"
rlRun "cmake --build ./build" 0 "Build project"
rlPhaseEnd

rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $tmp" 0 "Remove tmp directory"
rlPhaseEnd
rlJournalEnd

0 comments on commit d35e734

Please sign in to comment.