profile: fix typo Test.Opts -> Test.OPTS

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Tested-by: Kenneth Graunke <kenneth@whitecape.org>
framework: Remove she-bang from non executable python files

Nothing in framework/ or generated_tests/ is called directly using the
./syntax, instead it is called from cmake using python explicitly. With
that in mind none of them need a she-bang

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
python: Remove executable bit from generators

Test generators are not called using the ./ syntax, so no need have the
executable bit set.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
exectest.py: Remove {'result': 'skip'} from get_command_result()

Since 1012d68c an exception in Popen is no longer sent to
interpret_result(), instead it returns early, making this dead code.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
exectest.py: rename get_command_result to _run_command

This is shorter (and shorter is always better in a python), and it marks
the method as private (leading __) since it's only for use in a Test
method, not in it's children.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
exectest.py: Add and update some docstrings

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
exectest.py: rename check_for_skip_scenario to is_skip

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
gleantest.py: use exectest namespace

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
gleantest.py: fix is_skip()

Gleantest skipping was implemented in PiglitTest, which is not an
ancestor of GleanTest, so it would never be triggered.

It also was set to skip only on 'gbm', but I believe that glean requires
glx, so it should be skipping on any platform except glx.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
exectest.py: Fix PiglitTest.is_skip()

This fixes glx tests to skip on all platoforms except glx

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
fixup! gleantest.py: fix is_skip()
gleantest.py: Fix formatting

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
gleantest.py: rename GleanTest.globalParams to GLOBAL_PARAMS

This replaces the camel case name with an all caps constant name.

this patch generated by:
find . -name '*py' | xargs sed -i -e 's!globalParams!GLOBAL_PARAMS!g'

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
gleantest.py: replace glean_executable with class variable

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
gleantest.py: add docstring

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
exectest.py: Add message to out when is_skip() is True

This adds a note so that one knows why a specific test skipped.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework: refactor valgrind hanlding to make glean cleaner

This allows more state in glean to be shared rather than storing the
same list in memory once for each glean test.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
exectest.py: split valgrind checking out of Test.run()

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
exectest.py: Add some asserts to avoid common errors

This adds asserts to ensure that the types leaving Test._run_command()
are of the correct type (unicode and int), and adds one to ensure that
we don't compare None and 0

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>