From 2a9b150eb53e0cd602379ce88ee444b0b6fee2fe Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Tue, 4 Oct 2016 16:26:37 -0700 Subject: [PATCH 1/2] Test commit: inspect the env. vars. Travis / CircleCI use. This is sniffing around towards #2277, to see how much info we can use to restrict the tests we run. --- .travis.yml | 27 ++------------------------- circle.yml | 12 ++---------- scripts/print_env.py | 6 ++++++ scripts/print_travis.py | 10 ++++++++++ scripts/show_git_status.sh | 10 ++++++++++ 5 files changed, 30 insertions(+), 35 deletions(-) create mode 100644 scripts/print_env.py create mode 100644 scripts/print_travis.py create mode 100755 scripts/show_git_status.sh diff --git a/.travis.yml b/.travis.yml index 9bbf3a0a8c3f..c592491311f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,29 +1,6 @@ language: python sudo: false -addons: - apt: - sources: - - deadsnakes - packages: - - python3.5 - -install: - - pip install --upgrade pip tox - script: - - python2.7 scripts/run_unit_tests.py - - python3.4 scripts/run_unit_tests.py - - python3.5 scripts/run_unit_tests.py - - python scripts/run_unit_tests.py --tox-env cover - - tox -e lint - - tox -e system-tests - - tox -e system-tests3 - - scripts/update_docs.sh - -after_success: - - scripts/coveralls.sh - -cache: - directories: - - ${HOME}/.cache/pip + - python scripts/print_travis.py + - scripts/show_git_status.sh diff --git a/circle.yml b/circle.yml index 38082ca41a0b..e045298c6b9d 100644 --- a/circle.yml +++ b/circle.yml @@ -6,16 +6,8 @@ dependencies: test: override: - - python2.7 scripts/run_unit_tests.py - - python3.4 scripts/run_unit_tests.py - - python3.5 scripts/run_unit_tests.py - - python scripts/run_unit_tests.py --tox-env cover - - tox -e lint - # - tox -e system-tests - # - tox -e system-tests3 - # - scripts/update_docs.sh - post: - - scripts/coveralls.sh + - python scripts/print_env.py + - scripts/show_git_status.sh general: branches: diff --git a/scripts/print_env.py b/scripts/print_env.py new file mode 100644 index 000000000000..f74766e65231 --- /dev/null +++ b/scripts/print_env.py @@ -0,0 +1,6 @@ +import json +import os + + +env = dict(os.environ) +print(json.dumps(env, indent=2, sort_keys=True)) diff --git a/scripts/print_travis.py b/scripts/print_travis.py new file mode 100644 index 000000000000..d086e9a4082f --- /dev/null +++ b/scripts/print_travis.py @@ -0,0 +1,10 @@ +import os + +our_keys = sorted(key for key in os.environ.keys() + if 'travis' in key.lower()) +if our_keys: + for key in our_keys: + print('%s: %s' % (key, os.getenv(key))) +else: + print('No keys here, sorry') +# Added just for a commit. diff --git a/scripts/show_git_status.sh b/scripts/show_git_status.sh new file mode 100755 index 000000000000..ef414918f1c3 --- /dev/null +++ b/scripts/show_git_status.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -ev + +git status +echo '====================================' +git remote -vv +echo '====================================' +git branch -vv +echo '====================================' +git branch -a From d82a72b2c0f670fd91a927120bbb12c55af2ef56 Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Tue, 15 Nov 2016 11:26:13 -0800 Subject: [PATCH 2/2] Getting more info from git env. on CircleCI. --- scripts/show_git_status.sh | 54 +++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/scripts/show_git_status.sh b/scripts/show_git_status.sh index ef414918f1c3..4bcee1c9ef4c 100755 --- a/scripts/show_git_status.sh +++ b/scripts/show_git_status.sh @@ -1,10 +1,62 @@ #!/bin/bash -set -ev +set -e +echo 'git --version:' +echo '------------------------------------' +git --version + +# SEP +echo '====================================' +# SEP + +echo 'git status:' +echo '------------------------------------' git status + +# SEP echo '====================================' +# SEP + +echo 'git remote -vv:' +echo '------------------------------------' git remote -vv + +# SEP echo '====================================' +# SEP + +echo 'git branch -vv:' +echo '------------------------------------' git branch -vv + +# SEP echo '====================================' +# SEP + +echo 'git branch -a:' +echo '------------------------------------' git branch -a + +# SEP +echo '====================================' +# SEP + +echo 'git log -5:' +echo '------------------------------------' +git --no-pager log -5 + +# SEP +echo '====================================' +# SEP + +echo 'git log -5 master:' +echo '------------------------------------' +git --no-pager log -5 master + +# SEP +echo '====================================' +# SEP + +echo 'git log -5 origin/master:' +echo '------------------------------------' +git --no-pager log -5 origin/master