Skip to content

Instantly share code, notes, and snippets.

View apahim's full-sized avatar

Amador Pahim apahim

  • Red Hat, Inc
  • Ireland
View GitHub Profile
@apahim
apahim / issue#961
Last active January 18, 2016 17:14
[apahim@hurricane ~]$ cat test.py
#!/usr/bin/python
from avocado import Test
from avocado import main
from test2 import *
class BasicTestSuite(SuperTest):
"""
:avocado: enable
#!/usr/bin/python
import urlparse
import base64
import urllib2
import ssl
from xml.etree import ElementTree
vms_url = urlparse.urljoin('https://rhevm33.pahim.org:443', "/api/vms")
#!/bin/python
# Amador Pahim <apahim AT redhat DOT com>
import sys
import json
try:
logfile = sys.argv[1]
except:
logfile = '/var/log/rhsm/rhsm.log'
commit d7c28b0ae6d53f71a3d4cf20958c83710f70d1c5
Author: Amador Pahim <[email protected]>
Date: Sun Oct 25 18:33:50 2015 -0200
Adding support for --job-results-dir in replay feature
Signed-off-by: Amador Pahim <[email protected]>
diff --git a/avocado/core/job.py b/avocado/core/job.py
index 4adf57e..f339daa 100644
[asegundo@x240 avocado]$ avocado run /bin/true --job-results-dir=/tmp/
JOB ID : 285c581862cad40f97c56d63fa17b9cd7d34bb82
JOB LOG : /tmp/job-2015-10-25T18.18-285c581/job.log
TESTS : 1
(1/1) /bin/true: PASS (0.01 s)
RESULTS : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0
TIME : 0.01 s
[asegundo@x240 avocado]$ avocado run --replay 285c58
Job not found in "/home/asegundo/avocado/job-results". You can inform an alternate results directory with "--job-results-dir=/foo/bar"
- Created a custom config file, overwriting sysinfo.collectibles/files:
[asegundo@x240 avocado]$ cat ~/.config/avocado/avocado.conf
# You can use this file to override configuration values from /etc/avocado/avocado.conf and /etc/avocado/conf.d
[sysinfo.collectibles]
files = /tmp/files
- The new files list was "/proc/swaps" in it:
commit 3ea2603add9fa72d51c1400dcb9e383b1ec7c277
Author: Amador Pahim <[email protected]>
Date: Sun Oct 25 13:16:59 2015 -0200
SUpport for record/replay with avocado settings
Signed-off-by: Amador Pahim <[email protected]>
diff --git a/avocado/core/job.py b/avocado/core/job.py
index d0e1735..4adf57e 100644
commit 805b2aa2e99de434bb9e1e27b1d89b91a2147109
Author: Amador Pahim <[email protected]>
Date: Fri Oct 23 09:43:39 2015 -0200
Adding support to --replay-test-status
Signed-off-by: Amador Pahim <[email protected]>
diff --git a/avocado/core/job.py b/avocado/core/job.py
index 8a436b3..d0e1735 100644
@apahim
apahim / mux
Last active October 23, 2015 04:31
[asegundo@x240 avocado]$ avocado run /bin/true /bin/false --multiplex /home/asegundo/devel/up/apahim-avocado/examples/mux-environment.yaml
JOB ID : 14125c569f1b70236636cbb59927db9e6039ed1e
JOB LOG : /home/asegundo/avocado/job-results/job-2015-10-23T02.13-14125c5/job.log
TESTS : 48
(1/48) /bin/true.variant1: PASS (0.01 s)
(2/48) /bin/true.variant2: PASS (0.01 s)
(3/48) /bin/true.variant3: PASS (0.01 s)
(4/48) /bin/true.variant4: PASS (0.01 s)
(5/48) /bin/true.variant5: PASS (0.01 s)
(6/48) /bin/true.variant6: PASS (0.01 s)
[asegundo@x240 avocado]$ avocado run /bin/true /bin/false
JOB ID : d5756b551f4d3d49e597611a357e9634f4b2359d
JOB LOG : /home/asegundo/avocado/job-results/job-2015-10-23T02.00-d5756b5/job.log
TESTS : 2
(1/2) /bin/true: PASS (0.01 s)
(2/2) /bin/false: FAIL (0.02 s)
RESULTS : PASS 1 | ERROR 0 | FAIL 1 | SKIP 0 | WARN 0 | INTERRUPT 0
TIME : 0.03 s
[asegundo@x240 avocado]$ avocado run --replay d575