-
Notifications
You must be signed in to change notification settings - Fork 17
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
Modify tests to work with svn 1.14 #275
Conversation
Ubuntu 22.04 uses svn 1.14.1 so shouldn't be affected by the svn bug which causes failures with 20.04 (see #267) |
974ba49
to
c69b6bf
Compare
svn 1.11+ contains improvements to the handling of tree conflicts. |
@@ -5,12 +5,12 @@ jobs: | |||
strategy: | |||
fail-fast: False | |||
matrix: | |||
ubuntu: ['ubuntu-18.04', 'ubuntu-20.04'] | |||
ubuntu: ['ubuntu-20.04', 'ubuntu-22.04'] |
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.
Why not ubuntu-latest?
Sadly, there isn't the option of doing `['ubuntu-earliest', 'unbuntu-second-latest', 'ubuntu-latest']
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.
No particular reason - I just prefer to be explicit
t/lib/bash/test_header
Outdated
text = sys.stdin.read() | ||
sending_lines = re.findall("^\w+ing +.*$", text, re.M) | ||
prefix = text[:text.index(sending_lines[0])] | ||
suffix = text[(text.index(sending_lines[-1]) + len(sending_lines[-1])):] | ||
sending_lines.sort() | ||
print prefix + "\n".join(sending_lines) + suffix.rstrip() | ||
print (prefix + "\n".join(sending_lines) + suffix.rstrip()) |
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.
The space between print
and (
is valid but looks odd.
expected:
print (prefix + "\n".join(sending_lines) + suffix.rstrip()) | |
print(prefix + "\n".join(sending_lines) + suffix.rstrip()) |
t/lib/bash/test_header
Outdated
@@ -234,13 +251,13 @@ function commit_sort() { | |||
# Sort the svn status part of the message | |||
status_sort $INPUT_FILE $TMP_OUTPUT_FILE | |||
# Sort the 'Adding/Deleting', etc part of the message | |||
python2 -c 'import re, sys | |||
python3 -c 'import re, sys | |||
text = sys.stdin.read() | |||
sending_lines = re.findall("^\w+ing +.*$", text, re.M) |
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.
You'll get syntax deprecation warnings with this.
sed -i 's@(re\..*\()"@$1r"@g' t/lib/bash/test_header
e.g.
> ./bin/fcm_test_battery t/fcm-commit/00-simple.t
t/fcm-commit/00-simple.t .. 1/3 <string>:3: SyntaxWarning: invalid escape sequence '\w'
<string>:3: SyntaxWarning: invalid escape sequence '\w'
t/fcm-commit/00-simple.t .. ok
All tests successful.
Files=1, Tests=3, 1 wallclock secs ( 0.02 usr 0.01 sys + 0.44 cusr 0.44 csys = 0.91 CPU)
Result: PASS
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.
Python 2→3
In descending order of importance:
re.????("...
→re.????(r"...
: Important if you don't want warning messages.print ("
→print("
: not an essential change, but it looks odd to my eye.- Investigated that
list.sort()
behaves the same way for the Python 3 (just in case).
SVN tests
I have had a skim read through the *.t
files. I'm not super familiar with FCM/SVN output: I can do a more detailed review if you want, but that would involve considerable learning, and I think will hit the law of diminishing returns.
Modify tests to work with svn 1.14 Skip tests which are broken with svn 1.13.0 (Ubuntu 20.04) Use Python 3 (not 2) in tests
c69b6bf
to
567c352
Compare
Also