Skip to content

Commit

Permalink
Fixed failed unit tests in CI
Browse files Browse the repository at this point in the history
A fix for logging was implemented for sharness unit tests in the upstream GitLab CI file, whose modifications weren't copied to our Drone CI file, which resulted in some tests failing. The new commands have been copied, thus fixing the issue.
  • Loading branch information
hwittenborn committed Dec 11, 2021
1 parent a13569c commit ebfe3e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .drone/scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ until : > /dev/tcp/127.0.0.1/3306; do sleep 1s; done

make -C po all install
make -C test clean

cp logging.conf logging.conf.bak
cp logging.prod.conf logging.conf

make -C test sh

cp logging.conf.bak logging.conf

# Set up config file to work properly for unit tests.
sed -i 's|^user =.*|user = root|' conf/config.defaults
sed -i 's|^sendmail =.*|sendmail = YOUR_AUR_ROOT/util/sendmail|' conf/config.defaults
Expand Down
2 changes: 1 addition & 1 deletion test/sharness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ test_expect_code() {
#
# Returns the exit code of the command set by TEST_CMP.
test_cmp() {
${TEST_CMP:-diff -u} "$@"
${TEST_CMP:-diff -ua} "$@"
}

# Public: portably print a sequence of numbers.
Expand Down

0 comments on commit ebfe3e0

Please sign in to comment.