-
Notifications
You must be signed in to change notification settings - Fork 931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chutney ci 035 #736
base: maint-0.3.5
Are you sure you want to change the base?
Chutney ci 035 #736
Changes from all commits
f7590f6
21c3d43
1579747
911371f
68ef52d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
o Minor features (continuous integration): | ||
- Our Travis configuration now uses Chutney to run some network | ||
integration tests automatically. Closes ticket 29280. |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,24 @@ | ||||||
#!/bin/sh | ||||||
|
||||||
TEST_NET_RETRIES=${TEST_NET_RETRIES:-3} | ||||||
|
||||||
n_tries=0 | ||||||
test_net_okay=0 | ||||||
|
||||||
while [ "${n_tries}" -lt "${TEST_NET_RETRIES}" ]; do | ||||||
n_tries=$((n_tries + 1)) | ||||||
# shellcheck disable=SC2086 | ||||||
if "${top_srcdir:-.}/src/test/test-network.sh" ${TEST_NETWORK_FLAGS}; then | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we use the script directory instead of the current working directory?
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm. The script directory would mean that the default was something like scripts/test/src/test/test-network.sh, which won't work. Maybe the default should be the script directory, followed by /../.. ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, you're right, we need to go back those two steps, then forward. |
||||||
echo "Chutney ran successfully after ${n_tries} attempt(s)." | ||||||
test_net_okay=1 | ||||||
break | ||||||
fi | ||||||
echo "Chutney failed on attempt ${n_tries}/${TEST_NET_RETRIES}." | ||||||
done; | ||||||
|
||||||
if [ "$test_net_okay" != 1 ]; then | ||||||
echo "Too many chutney failures; failing." | ||||||
exit 1; | ||||||
fi | ||||||
|
||||||
exit 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we put test-network-forgiving.sh in chutney/tools rather than tor/src/test?
It would be a useful script to have in chutney, and chutney's CI may need it.
(We moved almost all of our chutney-specific scripts to chutney many releases ago. tor/src/test/test-network.sh is a stub that finds chutney/tools/test-network.sh. I want to avoid any more chutney-specific scripts in Tor.)
But if it's in chutney, how can we reliably find it from the Makefile, without duplicating the logic in tor/src/test/test-network.sh?
Maybe we could make the code in test-network-forgiving.sh part of chutney/tools/test-network.sh?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to have this become part of test-network.sh eventually, and I tried to do that at first, but I think for now this is a good compromise. The issue I had was that the maint-0.2.9 version of test-network.sh and the master version of test-network.sh are pretty different, and I want to actually run the same version of test-network.sh that the associated Tor has.
Once maint-0.2.9 is EOL, I would be much less confused about folding this into the test-network.sh script that chutney has.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But tor's test-network.sh calls chutney's test-network.sh?
(It certainly does on 0.3.4. And it does on my macOS machine in 0.2.9. But it seems to be broken in our 0.2.9 CI on Linux, which probably means we need to backport some fixes to 0.2.9's test-network.sh. I'll track them down.)
So I think we should modify chutney's test-network.sh in chutney master, and leave tor's test-network.sh alone.
Here's how it's supposed to work:
Since 0.2.9.1-alpha, tor's test-network.sh automatically calls chutney's test-network.sh, using the same arguments it was passed. So any new features in chutney's test-network.sh can be used by calling tor's test-network.sh with the correct arguments.
And since 0.3.1.1-alpha, there's no useful code in tor's test-network.sh: all it does is search for chutney's test-network.sh and exec it.
In 0.2.9, we decided not to add any more chutney-related features to tor. I'd like to keep that policy, because moving these kinds of scripts is a pain.