Skip to content

Commit 0c37edb

Browse files
committed
Merge branch 'mr/jicquel/#124.gnatcoll_support_vxworks' into 'master'
Split gnatcoll_support.c into two files: one for minimal and one for core See merge request eng/toolchain/gnatcoll-core!201
2 parents 3ff2377 + dd56826 commit 0c37edb

File tree

7 files changed

+181
-182
lines changed

7 files changed

+181
-182
lines changed

.gitlab-ci.yml

Lines changed: 116 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
workflow:
22
rules:
3-
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
4-
when: always
5-
- if: $CI_PIPELINE_SOURCE == "schedule"
6-
when: always
7-
- if: $CI_PIPELINE_SOURCE == "web"
8-
when: always
9-
- when: never
3+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
4+
when: always
5+
- if: $CI_PIPELINE_SOURCE == "schedule"
6+
when: always
7+
- if: $CI_PIPELINE_SOURCE == "web"
8+
when: always
9+
- when: never
1010

1111
variables:
12-
ANOD_DEFAULT_SANDBOX_DIR: /it/wave
13-
HOST: x86_64-linux
12+
ANOD_DEFAULT_SANDBOX_DIR: /it/wave
13+
HOST: x86_64-linux
1414

1515
stages:
16-
- build
16+
- build
1717

1818
default:
1919
before_script: |
@@ -61,8 +61,8 @@ default:
6161

6262
.job_template:
6363
services:
64-
- image:pe-base
65-
- cpu:4
64+
- image:pe-base
65+
- cpu:4
6666
interruptible: true
6767

6868
########
@@ -71,132 +71,113 @@ default:
7171

7272
build_doc:
7373
services:
74-
- image:pe-base
75-
- cpu:2
74+
- image:pe-base
75+
- cpu:2
7676
stage: build
7777
script:
78-
- anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
79-
- anod build --latest gnatcoll-core-doc
80-
- mv $ANOD_DEFAULT_SANDBOX_DIR/x86_64-linux/gnatcoll-core-doc/install doc-build
78+
- anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
79+
- anod build --latest gnatcoll-core-doc
80+
- mv $ANOD_DEFAULT_SANDBOX_DIR/x86_64-linux/gnatcoll-core-doc/install doc-build
8181
artifacts:
82-
when:
83-
always
82+
when: always
8483
paths:
85-
- doc-build
84+
- doc-build
8685

8786
build_and_test_windows:
8887
services:
89-
- image:e3-windows-2022
90-
- platform:x86_64-windows-2022
91-
- cpu:2
92-
- mem:8
93-
- disk:100
88+
- image:e3-windows-2022
89+
- platform:x86_64-windows-2022
90+
- cpu:2
91+
- mem:8
92+
- disk:100
9493
stage: build
9594
script:
96-
- anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
97-
- anod build --latest gnatcoll-core
98-
- anod test --latest gnatcoll-core -Qexternal
99-
- working_dir=$(anod info test gnatcoll-core --show working_dir -Qexternal)
100-
- results_dir=$working_dir/results/new
101-
- e3-testsuite-report
102-
--failure-exit-code 1
103-
--xunit-output $CI_PROJECT_DIR/test.xml
104-
--xunit-name gnatcoll-core
105-
$results_dir || FAILED=true
106-
107-
# We previously prevented the pipeline from halting if a test failed, to make
108-
# sure all tests were run. If a test failed now we exit with a non-zero code
109-
- if [ "$FAILED" = "true" ]; then echo "There was at least one testcase failure" && exit 1; fi
95+
- anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
96+
- anod build --latest gnatcoll-core
97+
- anod test --latest gnatcoll-core -Qexternal
98+
- working_dir=$(anod info test gnatcoll-core --show working_dir -Qexternal)
99+
- results_dir=$working_dir/results/new
100+
- e3-testsuite-report --failure-exit-code 1 --xunit-output $CI_PROJECT_DIR/test.xml --xunit-name gnatcoll-core $results_dir || FAILED=true
101+
102+
# We previously prevented the pipeline from halting if a test failed, to make
103+
# sure all tests were run. If a test failed now we exit with a non-zero code
104+
- if [ "$FAILED" = "true" ]; then echo "There was at least one testcase failure" && exit 1; fi
110105
allow_failure: true
111106
artifacts:
112-
when:
113-
always
107+
when: always
114108
paths:
115-
- test.xml
109+
- test.xml
116110
reports:
117111
junit: test.xml
118112

119113
build_and_test_aarch64_linux:
120114
services:
121-
- image:e3-aarch64-linux
122-
- cpu:4
123-
- platform:aarch64-linux
115+
- image:e3-aarch64-linux
116+
- cpu:4
117+
- platform:aarch64-linux
124118
stage: build
125119
script:
126-
- anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
127-
- anod build --latest gnatcoll-core
128-
- anod test --latest gnatcoll-core -Qexternal
129-
- e3-testsuite-report
130-
--failure-exit-code 1
131-
--xunit-output $CI_PROJECT_DIR/test.xml
132-
--xunit-name gnatcoll-core
133-
$ANOD_DEFAULT_SANDBOX_DIR/aarch64-linux/gnatcoll-core_external_test/results/new/ || FAILED=true
134-
135-
# We previously prevented the pipeline from halting if a test failed, to make
136-
# sure all tests were run. If a test failed now we exit with a non-zero code
137-
- if [ "$FAILED" = "true" ]; then echo "There was at least one testcase failure" && exit 1; fi
120+
- anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
121+
- anod build --latest gnatcoll-core
122+
- anod test --latest gnatcoll-core -Qexternal
123+
- e3-testsuite-report --failure-exit-code 1 --xunit-output $CI_PROJECT_DIR/test.xml --xunit-name gnatcoll-core $ANOD_DEFAULT_SANDBOX_DIR/aarch64-linux/gnatcoll-core_external_test/results/new/ || FAILED=true
124+
125+
# We previously prevented the pipeline from halting if a test failed, to make
126+
# sure all tests were run. If a test failed now we exit with a non-zero code
127+
- if [ "$FAILED" = "true" ]; then echo "There was at least one testcase failure" && exit 1; fi
138128
allow_failure: true
139129
artifacts:
140-
when:
141-
always
130+
when: always
142131
paths:
143-
- test.xml
132+
- test.xml
144133
reports:
145134
junit: test.xml
146135

147136
build_debug_mode_x86_64_linux:
148137
extends: .job_template
149138
stage: build
150139
script:
151-
- anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
152-
- anod build --latest gnatcoll-core -Qdbg
140+
- anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
141+
- anod build --latest gnatcoll-core -Qdbg
153142

154143
build_and_test_x86_linux:
155144
extends: .job_template
156145
stage: build
157146
script:
158-
- cp /it/e3/lib/python3.12/site-packages/e3/os/data/rlimit-x86_64-linux /it/e3/lib/python3.12/site-packages/e3/os/data/rlimit-x86-linux
159-
- anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
160-
- anod build --latest --build=x86-linux gnatcoll-core
161-
- anod test --latest --build=x86-linux gnatcoll-core -Qexternal
162-
- e3-testsuite-report
163-
--failure-exit-code 1
164-
--xunit-output $CI_PROJECT_DIR/test.xml
165-
--xunit-name gnatcoll-core
166-
$ANOD_DEFAULT_SANDBOX_DIR/x86-linux/gnatcoll-core_external_test/results/new/ || FAILED=true
167-
168-
# We previously prevented the pipeline from halting if a test failed, to make
169-
# sure all tests were run. If a test failed now we exit with a non-zero code
170-
- if [ "$FAILED" = "true" ]; then echo "There was at least one testcase failure" && exit 1; fi
147+
- cp /it/e3/lib/python3.12/site-packages/e3/os/data/rlimit-x86_64-linux /it/e3/lib/python3.12/site-packages/e3/os/data/rlimit-x86-linux
148+
- anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
149+
- anod build --latest --build=x86-linux gnatcoll-core
150+
- anod test --latest --build=x86-linux gnatcoll-core -Qexternal
151+
- e3-testsuite-report --failure-exit-code 1 --xunit-output $CI_PROJECT_DIR/test.xml --xunit-name gnatcoll-core $ANOD_DEFAULT_SANDBOX_DIR/x86-linux/gnatcoll-core_external_test/results/new/ || FAILED=true
152+
153+
# We previously prevented the pipeline from halting if a test failed, to make
154+
# sure all tests were run. If a test failed now we exit with a non-zero code
155+
- if [ "$FAILED" = "true" ]; then echo "There was at least one testcase failure" && exit 1; fi
171156
artifacts:
172-
when:
173-
always
157+
when: always
174158
paths:
175-
- test.xml
159+
- test.xml
176160
reports:
177161
junit: test.xml
178162

179163
.build_and_test_x86_64_linux_template:
180164
extends: .job_template
181165
stage: build
182166
script:
183-
- anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
184-
- anod build --latest gnatcoll-core $BUILD_ARGS
185-
- anod test --latest gnatcoll-core $TEST_ARGS
186-
- e3-testsuite-report
187-
--failure-exit-code 1
188-
--xunit-output $CI_PROJECT_DIR/test.xml
189-
--xunit-name gnatcoll-core
190-
$ANOD_DEFAULT_SANDBOX_DIR/$HOST/$TEST_DIR/results/new/ || FAILED=true
191-
192-
# We previously prevented the pipeline from halting if a test failed, to make
193-
# sure all tests were run. If a test failed now we exit with a non-zero code
194-
- if [ "$FAILED" = "true" ]; then echo "There was at least one testcase failure" && exit 1; fi
167+
- anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
168+
- anod build --latest gnatcoll-core $BUILD_ARGS
169+
- anod test --latest gnatcoll-core $TEST_ARGS
170+
- working_dir=$(anod info test gnatcoll-core --show working_dir $TEST_ARGS)
171+
- results_dir=$working_dir/results/new
172+
- e3-testsuite-report --failure-exit-code 1 --xunit-output $CI_PROJECT_DIR/test.xml --xunit-name gnatcoll-core $results_dir || FAILED=true
173+
174+
# We previously prevented the pipeline from halting if a test failed, to make
175+
# sure all tests were run. If a test failed now we exit with a non-zero code
176+
- if [ "$FAILED" = "true" ]; then echo "There was at least one testcase failure" && exit 1; fi
195177
artifacts:
196-
when:
197-
always
178+
when: always
198179
paths:
199-
- test.xml
180+
- test.xml
200181
reports:
201182
junit: test.xml
202183

@@ -205,74 +186,69 @@ build_and_test_x86_64_linux:
205186
variables:
206187
BUILD_ARGS: ""
207188
TEST_ARGS: -Qexternal
208-
TEST_DIR: gnatcoll-core_external_test
209-
FATAL_ERRORS: true
210189

211190
build_and_test_x86_64_linux_llvm:
212191
extends: .build_and_test_x86_64_linux_template
213-
allow_failure: true
214192
variables:
215193
BUILD_ARGS: -Qcompiler=gnat-llvm
216194
TEST_ARGS: -Qcompiler=gnat-llvm
217-
TEST_DIR: gnatcoll-core_gnat-llvm_test
218-
FATAL_ERRORS: false
195+
196+
build_x86_64_linux_vx7r2_21.07:
197+
extends: .job_template
198+
stage: build
199+
script:
200+
- anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
201+
- anod build --latest gnatcoll-core --target=x86_64-vx7r2,21.07,,unknown
219202

220203
build_and_test_x86_64_linux_valgrind:
221204
extends: .build_and_test_x86_64_linux_template
222-
allow_failure: true
205+
allow_failure: true # To remove once all tests pass
223206
variables:
224207
BUILD_ARGS: ""
225208
TEST_ARGS: -Qvalgrind
226-
TEST_DIR: gnatcoll-core_valgrind_test
227-
FATAL_ERRORS: false # TODO: set to True once all the leaks have been fixed
228209

229210
build_and_test_coverage:
230211
extends: .job_template
231212
stage: build
232213
script:
233-
- anybadge -l Coverage -v "Under Construction" -f coverage.svg -c steelblue
234-
- anybadge -l "Tests Passing" -v "Error" -f test-count.svg -c red
235-
236-
- anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
237-
- anod build --latest gnatcoll-core -Qcoverage
238-
- anod test --latest gnatcoll-core -Qcoverage
239-
240-
- e3-testsuite-report
241-
--failure-exit-code 1
242-
--xunit-output $CI_PROJECT_DIR/test-coverage.xml
243-
--xunit-name gnatcoll-core
244-
$ANOD_DEFAULT_SANDBOX_DIR/$HOST/gnatcoll-core_coverage_test/results/new/ || FAILED=true
245-
246-
# Create test count badge
247-
- cd $CI_PROJECT_DIR
248-
- rm test-count.svg # remove placeholder error badge
249-
- create_xunit_badge --xunit_reports test-coverage.xml
250-
251-
# Move coverage reports and log coverage summaries
252-
- mkdir $CI_PROJECT_DIR/coverage
253-
- mv $ANOD_DEFAULT_SANDBOX_DIR/$HOST/gnatcoll-core_coverage_test/results/new/coverage-xml $CI_PROJECT_DIR/coverage/xml
254-
- mv $ANOD_DEFAULT_SANDBOX_DIR/$HOST/gnatcoll-core_coverage_test/results/new/coverage-dhtml $CI_PROJECT_DIR/coverage/dhtml
255-
- mv $ANOD_DEFAULT_SANDBOX_DIR/$HOST/gnatcoll-core_coverage_test/results/new/coverage-cobertura $CI_PROJECT_DIR/coverage/cobertura
256-
- echo_coverage_stats --coverage-file $CI_PROJECT_DIR/coverage/xml/index.xml
257-
258-
- publish-pages ./coverage/dhtml/ --job
259-
260-
# We previously prevented the pipeline from halting if a test failed, to make
261-
# sure all tests were run. If a test failed now we exit with a non-zero code
262-
- if [ ! -z ${FAILED+x} ]; then echo "There was at least one testcase failure" && exit 1; fi
214+
- anybadge -l Coverage -v "Under Construction" -f coverage.svg -c steelblue
215+
- anybadge -l "Tests Passing" -v "Error" -f test-count.svg -c red
216+
217+
- anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
218+
- anod build --latest gnatcoll-core -Qcoverage
219+
- anod test --latest gnatcoll-core -Qcoverage
220+
221+
- e3-testsuite-report --failure-exit-code 1 --xunit-output $CI_PROJECT_DIR/test-coverage.xml --xunit-name gnatcoll-core $ANOD_DEFAULT_SANDBOX_DIR/$HOST/gnatcoll-core_coverage_test/results/new/ || FAILED=true
222+
223+
# Create test count badge
224+
- cd $CI_PROJECT_DIR
225+
- rm test-count.svg # remove placeholder error badge
226+
- create_xunit_badge --xunit_reports test-coverage.xml
227+
228+
# Move coverage reports and log coverage summaries
229+
- mkdir $CI_PROJECT_DIR/coverage
230+
- mv $ANOD_DEFAULT_SANDBOX_DIR/$HOST/gnatcoll-core_coverage_test/results/new/coverage-xml $CI_PROJECT_DIR/coverage/xml
231+
- mv $ANOD_DEFAULT_SANDBOX_DIR/$HOST/gnatcoll-core_coverage_test/results/new/coverage-dhtml $CI_PROJECT_DIR/coverage/dhtml
232+
- mv $ANOD_DEFAULT_SANDBOX_DIR/$HOST/gnatcoll-core_coverage_test/results/new/coverage-cobertura $CI_PROJECT_DIR/coverage/cobertura
233+
- echo_coverage_stats --coverage-file $CI_PROJECT_DIR/coverage/xml/index.xml
234+
235+
- publish-pages ./coverage/dhtml/ --job
236+
237+
# We previously prevented the pipeline from halting if a test failed, to make
238+
# sure all tests were run. If a test failed now we exit with a non-zero code
239+
- if [ ! -z ${FAILED+x} ]; then echo "There was at least one testcase failure" && exit 1; fi
263240
coverage: '/^Stmt Coverage:\s+(\d+\.\d+\%) \(\d+ \/ \d+\)$/'
264241
allow_failure: true
265242
artifacts:
266-
when:
267-
always
243+
when: always
268244
paths:
269-
- $PACKAGE
270-
- test-coverage.xml
271-
- coverage.svg
272-
- test-count.svg
273-
- coverage/xml
274-
- coverage/dhtml
275-
- coverage/cobertura
245+
- $PACKAGE
246+
- test-coverage.xml
247+
- coverage.svg
248+
- test-count.svg
249+
- coverage/xml
250+
- coverage/dhtml
251+
- coverage/cobertura
276252
reports:
277253
junit: test-coverage.xml
278254
coverage_report:

core/config/gnatcoll_core_constants.gpr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
abstract project GNATCOLL_Core_Constants is
22
GNATCOLL_VERSION_DEFAULT := "0.0";
3+
GNATCOLL_MMAP_DEFAULT := "yes";
4+
GNATCOLL_MADVISE_DEFAULT := "yes";
35
GNATCOLL_BLAKE3_ARCH_DEFAULT := "generic";
46
GNATCOLL_XXHASH_ARCH_DEFAULT := "generic";
57
GNATCOLL_BUILD_MODE_DEFAULT := "PROD";

0 commit comments

Comments
 (0)