- 09 2月, 2016 1 次提交
-
-
由 Lukáš Doktor 提交于
Last time it did not work, let's try it again to see whether it works. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 05 2月, 2016 1 次提交
-
-
由 Amador Pahim 提交于
avocado.core.runner: Force methodName on replay_map substitution
-
- 04 2月, 2016 10 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
avocado.utils.software_manager: Bugfixes and cleanups
-
由 Lucas Meneghel Rodrigues 提交于
Test namespace cleanup [3rd round]
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
tempfile.mktemp is insecure. Let's use NamedTemporaryFile instead and leave the cleanup on failure on python. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
The cfgparser converts arguments internally. If we supply integer, it raises TypeError when it tires to read it. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Cleber Rosa 提交于
There is an issue when running SIMPLE tests with non absolute paths, example: $ echo "#!/bin/bash" > /tmp/test.sh $ echo "exit 0" >> /tmp/test.sh $ chmod +x /tmp/test.sh $ cd /tmp $ avocado run test.sh The previous work on the simple test runner, adding the filename property, actually fixes that bug, so let's add a functional test to avoid an regression. Reference: https://trello.com/c/nbhyILO0Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Lukáš Doktor 提交于
Run commands that require admin privileges with 'sudo' [2]
-
由 Cleber Rosa 提交于
Test and SimpleTest now have a filename property, so no need to keep the same information in the path attribute. Also, path is being abused by ExternalRunnerTest. Let's implement a proper filename attribute (one that returns None, since it may not be backed by a file), and use a custom attribute to hold the command name that will be executed. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
When there's no filename (test not backed by a file), there's no basedir and then also no expected stdout/stderr files. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
On 639ae27c, basedir is implemented with an explicit return. Let's do the same here for consistency. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 03 2月, 2016 4 次提交
-
-
由 Lukáš Doktor 提交于
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lukáš Doktor 提交于
The "replay_map" allows to substitute the test class with custom class. The problem is, that the "methodName" defined in "test_params" might not exist in this class. We have two choices, either leave it up to the user, to substitute with a compatible class (eg. by creating the "methodName" in "__init__" before calling the super.__init__), or we can require them to always use given "methodName". This patch uses the second approach as it seems less magical to me. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
由 Lucas Meneghel Rodrigues 提交于
selftests/functional/test_replay.py: fix typo that caused sysinfo col…
-
由 Cleber Rosa 提交于
I noticed during a run of the self test suite that system information was being collected (`rpm -qa` and the like can usually be seen using quite a few resources). It looks like this little typo was causing that. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 29 1月, 2016 4 次提交
-
-
由 Cleber Rosa 提交于
-
由 Cleber Rosa 提交于
This reverts commit 732a400a.
-
由 Lucas Meneghel Rodrigues 提交于
avocado.main(): avoid an infinite fork loop bomb [v4]
-
由 Cleber Rosa 提交于
Because the current implementation of avocado.main() creates a job and runs "sys.argv[0]" to implement standalone mode, it ends up running itself over and over. This simple proposed fix, prevents avocado.main() from running itself again if called from itself. Since they are on different processes, the mechanism chosen to do this is to set an environment variable, that will be seen by the next process. Also, by exiting from main() with an error code, the test first level test will fail. This will let the user know that the chosen approach (SIMPLE tests written in Python and calling main()) are not worthy of a PASS. The functional tests make use of Python's standard library utilities (subprocess module) directly for running Avocado because of current issues with Avocado's own process utility module. This adresses issue #961. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 28 1月, 2016 6 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
Test namespace cleanup [2nd round] [v2]
-
由 Cleber Rosa 提交于
IMHO it makes more sense to only publish these variables when they actually contain meaningful value. Right now it *may* contain "None" as this is maybe the value of the `basedir` and `datadir` attributes when the test is not backed by a file. Also, it's a lot more common, say, for a shell script to check if a variable is set (if [ -n $AVOCADO_TEST_DATA_DIR ] ...) then to check if it's not equal to "None". Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Avocado doesn't intent to support the use of these attributes by test (writers), so let's at the very least hide them. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The implementation of basedir from Avocado Test is also sufficient for SimpleTest now that the `filename` property is implemented. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
SIMPLE tests are backed by files, executable ones. So, it makes sense to have the `filename` property accordingly. The base Avocado Test class implementation of `basedir` applies to SimpleTest as well with this implementation. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Since basedir is closely related to `filename` and `datadir`, let's also make it a property for coherency. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 27 1月, 2016 10 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
Instead of assuming we have administrative privileges to run software manager related commands, use sudo in commands that do require root. We now assume you're running the test as a user that has sudo configuration such that no password will be prompted to execute that command [1]. A place where we need such a provision is when running on Amazon AWS instances (we can't run as root, but the base user of the image has the appropriate sudo configuration). [1] Running as root means that sudo won't be necessary, but figuring that out is responsibility of the process APIs, that were modified to take a sudo parameter and figure things out based on that. Signed-off-by: NLucas Meneghel Rodrigues <lookkas@gmail.com>
-
由 Lucas Meneghel Rodrigues 提交于
Instead of assuming we have administrative privileges to run service manager related commands, use sudo in commands that do require root. We now assume you're running the test as a user that has sudo configuration such that no password will be prompted to execute that command [1]. A place where we need such a provision is when running on Amazon AWS instances (we can't run as root, but the base user of the image has the appropriate sudo configuration). [1] Running as root means that sudo won't be necessary, but figuring that out is responsibility of the process APIs, that were modified to take a sudo parameter and figure things out based on that. Signed-off-by: NLucas Meneghel Rodrigues <lookkas@gmail.com>
-
由 Lucas Meneghel Rodrigues 提交于
Some commands do require admin privileges to run, but we can't use the 'root' user in some testing scenarios [1]. So let's add a 'sudo' parameter to process.run(), process.system() and process.system_output() interfaces, that will append a sudo command to the original command string, causing it to be executed under sudo. The basic assumption here is that the user executing the tests was added to the sudoers file in such a way that it can run administrative commands without a password. [1] One specific environment where we can't use the root user is when avocado runs on an AWS (Amazon Web Services) instance. Signed-off-by: NLucas Meneghel Rodrigues <lookkas@gmail.com>
-
由 Cleber Rosa 提交于
It now becomes a first class citizen, with proper documentation. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Some Test types are not backed directly by files, and thus do not have a datadir. One example is Avocado-VT's VirtTest class. Because of that, and because other custom Test types may adhere to the same logic of not having a datadir, let's make Avocado's base test class more robust against a `None` datadir. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Now that 7c967bb0 hid the methods that record/check stdout/stderr, let's also hide the attributes that hold their paths. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
Let's just mirror the parameter order of the super class. It's just easier on the eyes. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
-
由 Amador Pahim 提交于
Using an unknown option in a given subcommand leads argparse to show the main avocado usage instructions. This patch makes the argparse show the subcommand help instead. Also, argparse error exit code now matches error_codes.AVOCADO_FAIL, which makes more sense than error_codes.AVOCADO_JOB_FAIL. Reference:https://trello.com/c/o0TpH9aeSigned-off-by: NAmador Pahim <apahim@redhat.com>
-
由 Lucas Meneghel Rodrigues 提交于
Test namespace cleanup
-
- 26 1月, 2016 4 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
avocado.core.test: PEP8 Fix
-
由 Lucas Meneghel Rodrigues 提交于
test_interrupt.py: Finish change a1afd91b
-
由 Lucas Meneghel Rodrigues 提交于
Turns out I thought out a1afd91b poorly, I needed to use a more encompassing try/except block, and replicate the block in the two tests that do psutil shenanigans. Signed-off-by: NLucas Meneghel Rodrigues <lookkas@gmail.com>
-
由 Lucas Meneghel Rodrigues 提交于
Signed-off-by: NLucas Meneghel Rodrigues <lookkas@gmail.com>
-