Skip to content

Commit 56ce4f3

Browse files
committed
Document difference in failing and skipping
1 parent e0b6273 commit 56ce4f3

File tree

9 files changed

+57
-32
lines changed

9 files changed

+57
-32
lines changed

.appveyor.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,26 @@ build:
88
cache:
99
- c:\tools\vcpkg\installed\ -> testing\dependencies\appveyor\install.bat
1010
- c:\msys64\var\cache\pacman\pkg -> testing\dependencies\appveyor\install.bat
11-
- c:\Deps\boost_1_67_0 -> testing\dependencies\appveyor\boost.bat
1211
- c:\Deps\conda\ -> testing\dependencies\appveyor\anaconda.ps1
12+
- c:\Deps\boost_1_67_0 -> testing\dependencies\appveyor\boost.bat
1313

1414
image:
1515
- Visual Studio 2017
1616

1717
environment:
1818
# Create expected SHELL variable for pipenv.
19-
SHELL: "windows"
20-
CTEST_OUTPUT_ON_FAILURE: "1"
19+
SHELL: 'windows'
20+
CTEST_OUTPUT_ON_FAILURE: '1'
2121
matrix:
22-
- CMAKE_GENERATOR: "MSYS Makefiles"
23-
BUILDFLAGS: "VERBOSE=1"
24-
CMAKEARGS: ""
25-
- CMAKE_GENERATOR: "Visual Studio 15 2017 Win64"
26-
BUILDFLAGS: "/verbosity:normal"
27-
CMAKEARGS: ""
28-
- CMAKE_GENERATOR: "Ninja"
29-
BUILDFLAGS: "-v"
30-
CMAKEARGS: ""
31-
- CMAKE_GENERATOR: "MSYS Makefiles"
32-
ANACONDA_TESTS_ONLY: "1"
33-
BUILDFLAGS: "VERBOSE=1"
34-
CMAKEARGS: ""
35-
- CMAKE_GENERATOR: "Visual Studio 15 2017 Win64"
36-
ANACONDA_TESTS_ONLY: "1"
37-
BUILDFLAGS: "/verbosity:normal"
38-
CMAKEARGS: ""
22+
- CMAKE_GENERATOR: 'MSYS Makefiles'
23+
BUILDFLAGS: 'VERBOSE=1'
24+
- CMAKE_GENERATOR: 'Visual Studio 15 2017 Win64'
25+
BUILDFLAGS: '/verbosity:normal'
26+
- CMAKE_GENERATOR: 'Ninja'
27+
BUILDFLAGS: '-v'
28+
- CMAKE_GENERATOR: 'Visual Studio 15 2017 Win64'
29+
BUILDFLAGS: '/verbosity:normal'
30+
ANACONDA_TESTS_ONLY: '1'
3931

4032
matrix:
4133
fast_finish: true

chapter-11/recipe-04/cxx-example/custom.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,23 @@ cp ../example.cpp .
1919
if [[ "$OSTYPE" == "msys" ]]; then
2020
conda.exe config --set always_yes yes --set changeps1 no
2121

22-
conda.exe build conda-recipe
22+
conda.exe build --no-anaconda-upload conda-recipe
2323

24-
conda.exe install --use-local conda-example-simple
24+
conda.exe install --no-update-dependencies --use-local --yes conda-example-simple
2525

2626
hello-conda.exe
27+
28+
conda.exe clean --all --yes
2729
else
2830
PATH=$HOME/Deps/conda/bin${PATH:+:$PATH}
2931

30-
conda build conda-recipe
32+
conda build --no-anaconda-upload conda-recipe
3133

32-
conda install --use-local conda-example-simple
34+
conda install --no-update-deps --use-local --yes conda-example-simple
3335

3436
hello-conda
37+
38+
conda clean --all --yes
3539
fi
3640

3741
exit $?
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
local:
22
env:
3-
- VERBOSE_OUTPUT: 'True'
3+
- VERBOSE_OUTPUT: 'ON'

chapter-11/recipe-05/cxx-example/conda-recipe/meta.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ requirements:
1717
- cmake >=3.5
1818
- {{ compiler('cxx') }}
1919
host:
20+
- intel-openmp 2018
2021
- mkl-devel 2018
2122

2223
about:

chapter-11/recipe-05/cxx-example/custom.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,23 @@ cp ../example.cpp .
1919
if [[ "$OSTYPE" == "msys" ]]; then
2020
conda.exe config --set always_yes yes --set changeps1 no
2121

22-
conda.exe build conda-recipe
22+
conda.exe build --no-anaconda-upload conda-recipe
2323

24-
conda.exe install --use-local conda-example-dgemm
24+
conda.exe install --no-update-deps --use-local --yes conda-example-dgemm
2525

2626
dgemm-example.exe
27+
28+
conda.exe clean --all --yes
2729
else
2830
PATH=$HOME/Deps/conda/bin${PATH:+:$PATH}
2931

30-
conda build conda-recipe
32+
conda build --no-anaconda-upload conda-recipe
3133

32-
conda install --use-local conda-example-dgemm
34+
conda install --no-update-deps --use-local --yes conda-example-dgemm
3335

3436
dgemm-example
37+
38+
conda clean --all --yes
3539
fi
3640

3741
exit $?
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
appveyor-vs:
2+
env:
3+
- VERBOSE_OUTPUT: 'ON'
4+
15
local:
26
env:
3-
- VERBOSE_OUTPUT: 'True'
7+
- VERBOSE_OUTPUT: 'ON'

contributing/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ To update the README files, run `python contributing/generate-readmes.py` - this
2424

2525
#### Indentation
2626

27-
We use 2 spaces instead of 4 spaces to reduce the printed page width.
28-
No tabs.
27+
We use 2 spaces instead of 4 spaces to reduce the printed page width. No tabs.
28+
Get the integration for [EditorConfig](https://editorconfig.org/) in your
29+
favorite editor to help you keep the conventions.
2930

3031

3132
#### Case of commands

testing/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,22 @@ appveyor-msys:
7070
- 'MSYS Makefiles'
7171
```
7272
73+
## When to use `failing_generators` and `skip_generators`
74+
75+
Marking generators as expected failures or skipping them achieves more or less
76+
the same goal: not failing CI for recipes that are known not to work under
77+
certain conditions. Using `failing_generators` means that the recipe is actually
78+
tested, but the possible failure is not elevated to an error; whereas using
79+
`skip_generators` will skip the testing altogether.
80+
The semantic to differentiate the use of the two is thus:
81+
1. Use `failing_generators` if the recipe does not work under the current CI set
82+
up, but _it could be made_ to work. As an example, the Ninja is always marked as
83+
an expected failure for Fortran recipes, since its set up is rather contrived,
84+
requiring specific versions specific versions of CMake _and_ Ninja.
85+
The hurdle could however be overcome in the future.
86+
2. Use `skip_generators` when _you cannot foresee any way_ to make the recipe work.
87+
This is the case for the Fortran recipes with the Visual Studio generators.
88+
7389

7490
## Bulding targets
7591

testing/collect_tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ def run_command(*, step, command, expect_failure):
5555
# Stream stderr always
5656
stderr_streamer = functools.partial(streamer, file_handle=sys.stderr)
5757
stderr = ''
58+
# subprocess.Popen can be managed as a context and allows us to stream
59+
# stdout and stderr in real-time
5860
with subprocess.Popen(
5961
cmd,
6062
bufsize=1,
@@ -166,6 +168,7 @@ def run_example(topdir, generator, ci_environment, buildflags, recipe, example):
166168
custom_script = 'custom.sh'
167169
custom_script_path = cmakelists_path / custom_script
168170
if custom_script_path.exists():
171+
sys.stdout.write('\nRunning a custom.sh script\n')
169172
# if this directory contains a custom.sh script, we launch it
170173
step = custom_script
171174
command = 'bash "{0}" "{1}"'.format(custom_script_path, build_directory)

0 commit comments

Comments
 (0)