Skip to content

Commit a9d1dfe

Browse files
committed
Test new defines
1 parent a6168c6 commit a9d1dfe

3 files changed

Lines changed: 50 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,36 @@ on:
3838
jobs:
3939
call-boost-ci:
4040
name: Run Boost.CI
41-
uses: boostorg/boost-ci/.github/workflows/reusable.yml@master
41+
uses: boostorg/boost-ci/.github/workflows/reusable.yml@pr/set-b2-vars
4242
# Customization:
4343
with:
44-
enable_reflection: true
45-
# enable_windows: false
46-
secrets:
47-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
48-
COVERITY_SCAN_NOTIFICATION_EMAIL: ${{ secrets.COVERITY_SCAN_NOTIFICATION_EMAIL }}
49-
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
44+
b2_targets: libs/boost-ci/test//test_def
45+
b2_defines: FOO="Hello world" BAR=2
46+
b2_link: shared,static
47+
b2_variant: debug
48+
library_folder: boost-ci
49+
enable_32bit: false
50+
enable_cygwin: false
51+
enable_cmake: false
52+
enable_mingw: false
53+
enable_multiarch: false
54+
enable_reflection: false
55+
enable_sanitizers: false
56+
exclude_compiler: 'gcc-10,clang-10,msvc-14.2'
57+
exclude_cxxstd: '98,03,0x,0y,14,2a,20,2b,23,2c,26' # only do C++11 and C++17 jobs
58+
exclude_os: 'ubuntu:16.04,macos,windows-2022'
59+
call-boost-ci-default:
60+
name: Run Default
61+
uses: boostorg/boost-ci/.github/workflows/reusable.yml@pr/set-b2-vars
62+
# Customization:
63+
with:
64+
enable_32bit: false
65+
enable_cygwin: false
66+
enable_cmake: false
67+
enable_mingw: false
68+
enable_multiarch: false
69+
enable_reflection: false
70+
enable_sanitizers: false
71+
exclude_compiler: 'gcc-10,clang-10,msvc-14.2'
72+
exclude_cxxstd: '98,03,0x,0y,14,2a,20,2b,23,2c,26' # only do C++11 and C++17 jobs
73+
exclude_os: 'ubuntu:16.04,macos,windows-2022'

test/Jamfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ if $(enable_reflection) = yes
5454
defs += <define>TEST_REFLECTION ;
5555
}
5656

57-
unit-test test : test.cpp :
58-
$(defs)
59-
<test-info>always_show_run_output
60-
;
57+
run test.cpp ;
58+
run test_def.cpp
59+
: : : <test-info>always_show_run_output ;
60+
61+
explicit test_def ;

test/test_def.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include <string>
2+
3+
#define STR1(x) #x
4+
#define STR(x) STR1(x)
5+
6+
int main()
7+
{
8+
const std::string foo = STR(FOO);
9+
if(foo != "Hello world")
10+
return 1;
11+
if(BAR != 2)
12+
return 1;
13+
return 0;
14+
}

0 commit comments

Comments
 (0)