-
Notifications
You must be signed in to change notification settings - Fork 31
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
Julia #126
Julia #126
Changes from all commits
f8fa21f
af1171d
f4a9743
436b497
7539986
aa86b0d
4c592cb
6879a2f
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 | ||||
---|---|---|---|---|---|---|
|
@@ -33,6 +33,9 @@ def each_test | |||||
elsif name =~ /^t(?!est)(.*?)$/ | ||||||
# Nim output | ||||||
name = underscore_to_ucamelcase($1) | ||||||
elsif tc.attribute('classname') and tc.attribute('classname').value =~ /^\/(.*?) test$/ | ||||||
# Julia output | ||||||
name = $1 | ||||||
else | ||||||
raise "Unable to parse name: \"#{name}\"" unless name =~ /^[Tt]est(.*?)$/ | ||||||
if $1[0] == '_' | ||||||
|
@@ -71,6 +74,15 @@ def each_test | |||||
|
||||||
tr = TestResult.new(name, :skipped, 0, nil) | ||||||
yield tr | ||||||
elsif ts.attribute('errors') && ts.attribute('errors').value.to_f != 0 && ts.attribute('name').value =~ /^\/(.*?) test$/ | ||||||
# Pick up Julia errored tests | ||||||
name = $1 | ||||||
error_element = ts.elements['error'] | ||||||
error_message = error_element.attribute('message').value if error_element | ||||||
error_trace = error_element.text.strip if error_element | ||||||
|
||||||
tr = TestResult.new(name, :error, 0, TestResult::Failure.new(nil, nil, error_message, error_trace)) | ||||||
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. This introduces a brand new test status
Suggested change
|
||||||
yield tr | ||||||
end | ||||||
} | ||||||
} | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
. ./config | ||
|
||
rm -rf "$TEST_OUT_DIR/julia" | ||
mkdir -p "$TEST_OUT_DIR/julia" | ||
|
||
JULIA_LOAD_PATH="$JULIA_LOAD_PATH:$JULIA_RUNTIME_DIR:compiled/julia:spec/julia/extra" julia -e 'using Pkg; Pkg.activate("/env"); include("spec/julia/runtests.jl")' "$TEST_OUT_DIR/julia/report.xml" | ||
|
||
./kst-adoption-report julia | ||
aggregate/convert_to_json julia "$TEST_OUT_DIR/julia" "$TEST_OUT_DIR/julia/ci.json" |
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,10 @@ | ||||||||||||||
#!/bin/bash | ||||||||||||||
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. This is the only Edit: oh,
Well, that's another good reason to use |
||||||||||||||
|
||||||||||||||
|
||||||||||||||
Comment on lines
+2
to
+3
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. Double newline here:
Suggested change
|
||||||||||||||
source ./config | ||||||||||||||
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. We use
Suggested change
everywhere. |
||||||||||||||
|
||||||||||||||
# Define the command to run the Julia script with redirected output | ||||||||||||||
command="JULIA_LOAD_PATH=\"$JULIA_LOAD_PATH:$JULIA_RUNTIME_DIR:compiled/julia:spec/julia/extra\" julia \"spec/julia/runtests.jl\"" | ||||||||||||||
|
||||||||||||||
# Run the command | ||||||||||||||
eval $command | ||||||||||||||
Comment on lines
+6
to
+10
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. I don't see any reason to use Why not just:
Suggested change
Also, I don't see the value of trivial comments such as |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Parsing the
errors
attribute as a float (.to_f
) doesn't make sense. It should be parsed as an integer, preferably using the strictest way possible, which would beInteger(..., 10)
(see https://stackoverflow.com/a/49282/12940655).Alternatively, we might not need to parse it at all, but instead can compare it directly to the string representation like
ts.attribute('errors').value != '0'
(this is even stricter, but all we really need, since there shouldn't be any other representations of zero anyway).