#378 Refine test runner for py26
Merged by cqi. Opened by cqi.
cqi/rpkg refine-test-runner-for-py26  into  master

Download 378.patch

Dependent tools to run tests do not support Python 2.6 recently, like
tox, that causes tox -e py26 fails to create a virtual environment
with python2.6 interpreter.

This patch uses a Makefile to create a Python 2.6 environment with
virtualenv manually and to organize steps to run tests with Python 2.6
and other Python versions in only one command make test.

Signed-off-by: Chenxiong Qi cqi@redhat.com

rebased onto 4a30662a5b2dde82aa83fd27d1934e5648b2ddbb

I'm getting this:

$ make test
Running virtualenv with interpreter /usr/bin/python2.6
ERROR: None
ERROR: this script requires Python 2.7 or greater.
make: *** [Makefile:5: py26-test] Error 101

The only thing In the py26env is tox. Why can't system version be used?

I run it and it works (with proper packages installed before).

rebased onto 92446c172c18f0add570c7dea0ff895000b6e3d8

Updated to allow ignore python26 by setting an environment variable. This could be useful for rpkg for a while before python26 is installed back into slave.

Pretty please pagure-ci rebuild

After updating python2-virtualenv make test works on my machine. :thumbsup:

rebased onto 77c133cc0ff0803f116ababc67ec8915389fb344

What is the right scenario (or correct command)?

[root@a3dfffed40a3 rpkg]# make test IGNORE_PY26=1
detox: invalid option -- 'e'
usage: detox [-hLnrvV] [-f configfile] [-s sequence] [--dry-run] [--inline] [--special]
      file [file ...]

otherwise (without IGNORE_PY26) it runs well and creates py26 virtual environment.

@onosek Based on my experience of make, command should be

IGNORE_PY26=1 make test

@cqi I am affraid output is completely same (I tried it previously).

@onosek Is it python2-detox-0.12-1.fc27.noarch?

actually detox-1.3.0-4.fc28.x86_64 was installed there. I replaced it with python2-detox-0.11-5.fc28.noarch and python3-detox-0.12-2.fc28.noarch respectively. Command make test IGNORE_PY26=1 is identical in my point of view. It works now - on docker container containing python3 packages it works completely. On docker container for testing python2 version of rpkg it works only when .tox directory and its content was already created.
But it is sufficient for me. Can be merged as per me. Thanks

Pull-Request has been merged by cqi

Metadata