Skip to content

Commit

Permalink
Merge pull request #2292 from sanssecours/🏔
Browse files Browse the repository at this point in the history
Alpine Linux: Enable CMake Option `ENABLE_KDB_TESTING`
  • Loading branch information
sanssecours committed Nov 4, 2018
2 parents 6372729 + 03f7063 commit c708660
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
4 changes: 3 additions & 1 deletion doc/news/_preparation_next_release.md
Expand Up @@ -276,8 +276,10 @@ you up to date with the multi-language support provided by Elektra.
- We fixed a crash in the unit test of the [JNA](https://www.libelektra.org/bindings/jna) binding. *(René Schwaiger)*
- The command [`kdb run_all`](https://master.libelektra.org/tests/README.md) now only prints the output of tests that failed. To print the
full output of all test, please use the option `-v`. *(René Schwaiger)*
- The [Shell Recorder][] does not use the non-POSIX grep option `--text` any more. *(René Schwaiger)*

[Markdown Shell Recorder]: https://master.libelektra.org/tests/shell/shell_recorder/tutorial_wrapper
[Shell Recorder]: https://master.libelektra.org/tests/shell/shell_recorder

## Build

Expand Down Expand Up @@ -318,7 +320,7 @@ you up to date with the multi-language support provided by Elektra.
### Jenkins

- <<TODO>>
- <<TODO>>
- We enabled tests that write to the hard disk on the build job `alpine`. *(René Schwaiger)*
- The build jobs now print less non-relevant output. *(René Schwaiger)*
- Enable `-Werror` in `debian-stable-full`. *(Lukas Winkler)
- We added the compiler switch `-Werror` to the build jobs:
Expand Down
2 changes: 0 additions & 2 deletions scripts/jenkins/Jenkinsfile
Expand Up @@ -527,14 +527,12 @@ def generateFullBuildStages() {
// Build Elektra on alpine
// TODO: Add more deps to test them with musl
// TODO: add date when their issues are resolved
// TODO: reenable kdb testing once it is POSIX conformant
tasks << buildAndTest(
"alpine",
DOCKER_IMAGES.alpine,
CMAKE_FLAGS_BUILD_ALL +
CMAKE_FLAGS_BUILD_STATIC + [
'PLUGINS': 'ALL;-date',
'ENABLE_KDB_TESTING': 'OFF'
],
[TEST.ALL]
)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/ini/README.md
Expand Up @@ -192,7 +192,7 @@ kdb file /tests/ini | xargs cat
#> brand = new

# Retrieve metadata
kdb lsmeta user/tests/ini/brand | grep --invert-match 'internal'
kdb lsmeta user/tests/ini/brand | grep -v 'internal'
# rationale
# description

Expand Down
5 changes: 0 additions & 5 deletions src/plugins/yamlcpp/README.md
Expand Up @@ -272,11 +272,6 @@ echo 'bin: !!binary aGk=' > `kdb file /tests/binary`
kdb get /tests/binary/bin
#> \x68\x69

# We can use `bash` to convert the hexadecimal value returned by `kdb get`
# to its ASCII representation.
bash -c 'printf `kdb get /tests/binary/bin`'
#> hi

# Add a string value to the database
kdb set /tests/binary/text mate
# Base 64 does not modify textual values
Expand Down
10 changes: 5 additions & 5 deletions tests/shell/shell_recorder/shell_recorder.sh
Expand Up @@ -87,7 +87,7 @@ execute() {
[ -n "$STDERR" ] && printf 'STDERR: %s\n' "$STDERR" >> "$OutFile"
if [ -n "${STDERRCMP+unset}" ]; then
executedTests=$((executedTests + 1))
if ! printf '%s' "$STDERR" | replace_newline_return | grep -Eq --text "^$STDERRCMP\$"; then
if ! printf '%s' "$STDERR" | replace_newline_return | grep -Eq "^$STDERRCMP\$"; then
printerr '\nERROR - STDERR:\n“%s”\ndoes not match\n“%s”\n\n' "$STDERR" "$STDERRCMP"
printf '=== FAILED stderr does not match expected pattern %s\n' "$STDERRCMP" >> "$OutFile"
numberErrors=$((numberErrors + 1))
Expand All @@ -103,7 +103,7 @@ execute() {
[ -n "$STDOUT" ] && printf '%s\n' "STDOUT: $STDOUT" >> "$OutFile"
if [ -n "${STDOUTCMP+unset}" ]; then
executedTests=$((executedTests + 1))
if ! printf '%s' "$STDOUT" | replace_newline_return | grep -Fqx --text -- "$STDOUTCMP" ||
if ! printf '%s' "$STDOUT" | replace_newline_return | grep -Fqx -- "$STDOUTCMP" ||
test -z "$STDOUTCMP" -a -n "$STDOUT"; then
printerr '\nERROR - STDOUT:\n“%s”\ndoes not match\n“%s”\n\n' "$STDOUT" "$STDOUTCMP"
printf '=== FAILED stdout does not match expected pattern %s\n' "$STDOUTCMP" >> "$OutFile"
Expand All @@ -117,7 +117,7 @@ execute() {

if [ -n "$STDOUTRECMP" ]; then
executedTests=$((executedTests + 1))
if ! printf '%s' "$STDOUT" | replace_newline_return | grep -Eq --text -- "$STDOUTRECMP"; then
if ! printf '%s' "$STDOUT" | replace_newline_return | grep -Eq -- "$STDOUTRECMP"; then
printerr '\nERROR - STDOUT:\n“%s”\ndoes not match\n“%s”\n\n' "$STDOUT" "$STDOUTRECMP"
printf '=== FAILED stdout does not match expected pattern %s\n' "$STDOUTRECMP" >> "$OutFile"
numberErrors=$((numberErrors + 1))
Expand All @@ -133,7 +133,7 @@ execute() {
[ -n "$WARNINGS" ] && printf 'WARNINGS: %s\n' "$WARNINGS" >> "$OutFile"
if [ -n "$WARNINGSCMP" ]; then
executedTests=$((executedTests + 1))
if ! printf '%s' "$WARNINGS" | replace_newline_return | grep -Eq --text -- "$WARNINGSCMP"; then
if ! printf '%s' "$WARNINGS" | replace_newline_return | grep -Eq -- "$WARNINGSCMP"; then
printerr '\nERROR - WARNINGS:\n“%s”\ndoes not match\n“%s”\n\n' "$WARNINGS" "$WARNINGSCMP"
printf '=== FAILED Warnings do not match expected pattern %s\n' "$WARNINGSCMP" >> "$OutFile"
numberErrors=$((numberErrors + 1))
Expand All @@ -149,7 +149,7 @@ execute() {
[ -n "$ERROR" ] && printf 'ERROR: %s\n' "$ERROR" >> "$OutFile"
if [ -n "$ERRORCMP" ]; then
executedTests=$((executedTests + 1))
if ! printf '%s' "$ERROR" | replace_newline_return | grep -Eq --text -- "$ERRORCMP"; then
if ! printf '%s' "$ERROR" | replace_newline_return | grep -Eq -- "$ERRORCMP"; then
printerr '\nERROR - ERROR:\n“%s”\ndoes not match\n“%s”\n\n' "$ERROR" "$ERRORCMP"
printf '=== FAILED Errors do not match expected pattern %s\n' "$ERRORCMP" >> "$OutFile"
numberErrors=$((numberErrors + 1))
Expand Down

0 comments on commit c708660

Please sign in to comment.