mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-23 00:44:55 +03:00
Run tests in parallel.
This commit is contained in:
parent
860585afaa
commit
9638b9b2b4
@ -1,6 +1,4 @@
|
||||
tests_ok/test.1.hurl: Running [1/2]
|
||||
tests_ok/test.1.hurl: Success (1 request(s) in ~~~ ms)
|
||||
tests_ok/test.2.hurl: Running [2/2]
|
||||
error: Assert body value
|
||||
--> tests_ok/test.2.hurl:8:1
|
||||
|
|
||||
@ -17,7 +15,6 @@ Succeeded files: 1 (50.0%)
|
||||
Failed files: 1 (50.0%)
|
||||
Duration: ~~~ ms
|
||||
|
||||
tests_ok/test.3.hurl: Running [1/1]
|
||||
tests_ok/test.3.hurl: Success (1 request(s) in ~~~ ms)
|
||||
--------------------------------------------------------------------------------
|
||||
Executed files: 1
|
||||
|
@ -3,6 +3,7 @@ $ErrorActionPreference = 'Stop'
|
||||
if (Test-Path build/result.xml) {
|
||||
Remove-Item build/result.xml
|
||||
}
|
||||
hurl --test --report-junit build/result.xml tests_ok/test.1.hurl tests_ok/test.2.hurl
|
||||
# We use --jobs 1 to force the standard error order to be test1 then test2.
|
||||
hurl --test --jobs 1 --report-junit build/result.xml tests_ok/test.1.hurl tests_ok/test.2.hurl
|
||||
hurl --test --report-junit build/result.xml tests_ok/test.3.hurl
|
||||
Write-Host (Get-Content build/result.xml -Raw) -NoNewLine
|
||||
|
@ -4,7 +4,8 @@ rm -f build/result.xml
|
||||
|
||||
# test.2.hurl is KO but we want the script to continue until the end
|
||||
set +eo pipefail
|
||||
hurl --test --report-junit build/result.xml tests_ok/test.1.hurl tests_ok/test.2.hurl
|
||||
# We use --jobs 1 to force the standard error order to be test1 then test2.
|
||||
hurl --test --jobs 1 --report-junit build/result.xml tests_ok/test.1.hurl tests_ok/test.2.hurl
|
||||
hurl --test --report-junit build/result.xml tests_ok/test.3.hurl
|
||||
set -Eeuo pipefail
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Set-StrictMode -Version latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
hurl --test --json --parallel --jobs 1 `
|
||||
hurl --test --json --jobs 1 `
|
||||
tests_ok/parallel_a.hurl `
|
||||
tests_ok/parallel_b.hurl `
|
||||
tests_ok/parallel_c.hurl `
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
hurl --test --json --parallel --jobs 1 \
|
||||
hurl --test --json --jobs 1 \
|
||||
tests_ok/parallel_a.hurl \
|
||||
tests_ok/parallel_b.hurl \
|
||||
tests_ok/parallel_c.hurl \
|
||||
|
@ -1,6 +1,4 @@
|
||||
tests_ok~test.1.hurl: Running [1/3]
|
||||
tests_ok~test.1.hurl: Success (1 request(s) in ~~~ ms)
|
||||
tests_ok~test.2.hurl: Running [2/3]
|
||||
error: Assert body value
|
||||
--> tests_ok~test.2.hurl:8:1
|
||||
|
|
||||
@ -11,7 +9,6 @@ error: Assert body value
|
||||
|
|
||||
|
||||
tests_ok~test.2.hurl: Failure (2 request(s) in ~~~ ms)
|
||||
tests_ok~test.3.hurl: Running [3/3]
|
||||
tests_ok~test.3.hurl: Success (1 request(s) in ~~~ ms)
|
||||
--------------------------------------------------------------------------------
|
||||
Executed files: 3
|
||||
|
@ -1,3 +1,4 @@
|
||||
Set-StrictMode -Version latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
hurl --test --glob "tests_ok/test.*.hurl"
|
||||
# We're using --jobs 1 to fix the standard error order.
|
||||
hurl --test --jobs 1 --glob "tests_ok/test.*.hurl"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
hurl --test --glob "tests_ok/test.*.hurl"
|
||||
# We're using --jobs 1 to fix the standard error order.
|
||||
hurl --test --jobs 1 --glob "tests_ok/test.*.hurl"
|
||||
|
@ -295,7 +295,7 @@ pub fn output_type(arg_matches: &ArgMatches) -> OutputType {
|
||||
}
|
||||
|
||||
pub fn parallel(arg_matches: &ArgMatches) -> bool {
|
||||
has_flag(arg_matches, "parallel")
|
||||
has_flag(arg_matches, "parallel") || has_flag(arg_matches, "test")
|
||||
}
|
||||
|
||||
pub fn path_as_is(arg_matches: &ArgMatches) -> bool {
|
||||
|
Loading…
Reference in New Issue
Block a user