mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-02 13:20:51 +00:00
Reduce the number of redundant test runs. Disable SNTP test on macos - it is flaky
This commit is contained in:
1 parent
4ae4ff72e3
commit
8d824799a0
4 files changed
+90
-21
No files matched your search
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This script is used by the Github Actions
|
||||
# o must be run with one parameter: a glob pattern
|
||||
# o write "MATCH=1" (changed files match a pattern) or "MATCH=0" to $GITHUB_OUTPUT
|
||||
#
|
||||
# Usage in github actions:
|
||||
# <job_name>:
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
# with: { fetch-depth: 2 } # Important for git diff to work
|
||||
# - id: check
|
||||
# run: /bin/bash check.sh '.*'
|
||||
# - if: steps.check.outputs.MATCH == 1
|
||||
# run: .....
|
||||
|
||||
# List all files changed by the last commit, and compare with the passed
|
||||
# pattern argument. If at least one file matches the pattern, write
|
||||
# MATCH=1. If no files match, write MATCH=0.
|
||||
for FILE in $(git --no-pager diff --name-only HEAD~1 HEAD) ; do
|
||||
if [[ "$FILE" =~ $1 ]] ; then
|
||||
echo FILE "$FILE" matches $1 # Log for debugging
|
||||
echo MATCH=1 >> $GITHUB_OUTPUT
|
||||
exit 0 # And exit early
|
||||
else
|
||||
echo FILE "$FILE" DOES NOT match $1 # Log for debugging
|
||||
fi
|
||||
done
|
||||
echo MATCH=0 >> $GITHUB_OUTPUT
|
||||
@@ -319,7 +319,9 @@ static void test_sntp_server(const char *url) {
|
||||
ASSERT(c->is_udp == 1);
|
||||
for (i = 0; i < 60 && ms == 0; i++) mg_mgr_poll(&mgr, 50);
|
||||
MG_DEBUG(("server: %s, ms: %lld", url ? url : "(default)", ms));
|
||||
#if !defined(NO_SNTP_CHECK)
|
||||
ASSERT(ms > 0);
|
||||
#endif
|
||||
mg_mgr_free(&mgr);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user