aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christopher Baklid <[email protected]>2018-06-03 12:32:42 +0200
committerGravatar Christopher Baklid <[email protected]>2018-06-03 12:32:42 +0200
commitc9c01602755505a2f6572ec2455c48f3bf683968 (patch)
treecd5e8bc53931c6f85238a6f924c938d09935e6f5
parentsudo all the things (diff)
trying changing to root in travis before build runs
-rw-r--r--.travis.yml13
-rw-r--r--snekbox.py6
2 files changed, 13 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index 122a1e7..ddfc5f0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,6 +16,7 @@ services:
before_install:
- sudo apt-get update
- sudo apt-get install -y libprotobuf-dev libstdc++6
+ - sudo su
env:
global:
@@ -26,13 +27,13 @@ env:
- RABBITMQ_HOST=localhost
install:
- - sudo pip install pipenv
- - sudo pipenv sync --dev --three
+ - pip install pipenv
+ - pipenv sync --dev --three
script:
- - sudo chmod +x scripts/ci.sh
- - sudo bash scripts/ci.sh
- - sudo pipenv run lint
- - sudo pipenv run test
+ - chmod +x scripts/ci.sh
+ - bash scripts/ci.sh
+ - pipenv run lint
+ - pipenv run test
#after_success:
# - bash scripts/deploy.sh
diff --git a/snekbox.py b/snekbox.py
index ceb897f..b3ee27e 100644
--- a/snekbox.py
+++ b/snekbox.py
@@ -57,13 +57,19 @@ class Snekbox(object):
stdout, stderr = proc.communicate()
if proc.returncode == 0:
output = stdout
+
elif proc.returncode == 1:
try:
output = stderr.split('\n')[-2]
except IndexError:
output = ''
+
elif proc.returncode == 109:
output = 'timed out or memory limit exceeded'
+
+ elif proc.returncode == 255:
+ output = 'permission denied (root required)'
+
else:
log.debug(stderr)
output = 'unknown error'