Skip to content

Commit 386d741

Browse files
authored
CI wasn't running elasticurl tests. (#171)
Also suppress output unless test fails
1 parent 32f49a5 commit 386d741

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

builder.json

+16
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
{
22
"name": "aws-c-http",
3+
"hosts": {
4+
"al2012": {
5+
"enabled": false,
6+
"_comment": "al2012 can't currently pull builder.py from github. SSL: CERTIFICATE_VERIFY_FAILED"
7+
}
8+
},
9+
"targets": {
10+
"android": {
11+
"enabled": false,
12+
"_comment": "disabled until we need to support it. LibCrypto needs to be configured on build machine."
13+
}
14+
},
315
"upstream": [
416
{ "name": "aws-c-io" },
517
{ "name": "aws-c-compression" }
618
],
719
"downstream": [
820
{ "name": "aws-c-auth" }
21+
],
22+
"test": [
23+
["ctest", ".", "--output-on-failure"],
24+
["{python}", "{source_dir}/integration-testing/http_client_test.py", "{install_dir}/bin/elasticurl{exe}"]
925
]
1026
}

integration-testing/http_client_test.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,18 @@
2525
# Remove args from sys.argv so that unittest doesn't also try to parse them.
2626
sys.argv = sys.argv[:1]
2727

28-
shell = sys.platform.startswith('win')
28+
def run_command(args):
29+
# gather all stderr and stdout to a single string that we print only if things go wrong
30+
process = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
31+
output = process.communicate()[0]
2932

33+
if process.returncode != 0:
34+
args_str = subprocess.list2cmdline(args)
35+
print(args_str)
36+
for line in output.splitlines():
37+
print(line.decode())
3038

31-
def run_command(args):
32-
subprocess.check_call(args, shell=shell)
39+
raise RuntimeError("Return code {code} from: {cmd}".format(code=process.returncode, cmd=args_str))
3340

3441
def compare_files(filename_expected, filename_other):
3542
if not filecmp.cmp(filename_expected, filename_other, shallow=False):

0 commit comments

Comments
 (0)