arb_tessellation_shader: Add tests covering handling of unsized arrays

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
run.py: Remove stray newlines

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
run.py: Split command parser out of run()

This change is necessary to be able to regression test the parser, which
has grown quite large and complicated. The unit testing of the parser is
necessitated by changes coming later in this series.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
python tests: Move helper from program_tests.py to utils.py

This class is useful in more than one module, so moving it to utils,
which is shared, is useful.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
program_tests.py: remove unused import

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
program_tests.py: fix bug reseting PIGILT_CONFIG

Currently the function that is supposed to reset core.PIGLIT_CONFIG
doesn't actually reset it, it does a comparison, which is meaningless.
This patch fixes that, and shows that there are actually two failures.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
programs_tests.py: Fix get_config() finds $HOME/.config/piglit.conf

This is a stupid bug, the test doesn't actually call the function to be
tested. Adding the function to actually test fixes the issue.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
core.py: Fix bug in get_config

A bug was introduced in 9e0c3ee1, this fixes it.

Because the get_config needs to find the piglit root, it has a hard
coded path to look for <current file>/../.. which worked when it was in
framework/programs/run.py, but in the mentioned commit the function was
moved to framework/core.py, a level down, so the hard coded path no
longer worked. This patch removes a '..', so the function now searches
for the right depth.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
program_tests.py: refactor into a single class

This is groundwork to allow some additional code sharing between the
tests.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
programs_tests.py: Remove duplicate teardown call

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
programs_tests.py: Move more code into a shared method

This adds a private method to TestGetConfig to allow more code sharing
between the tests.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
programs_tests.py: Move additional code into a shared method

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
programs_tests.py: Put private methods that are always used in setup

This moves calls to __move_local and __unset_config into setup(), which
is called before each method. This reduces the code duplication even
further.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
programs_tests.py: move CONF_FILE into the TestGetConfig class

This constant is only used for these tests, and this will make the next
patch cleaner.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
framework: Merge programs_tests.py into core_tests.py

Commit 9e0c3ee1 moved get_config() out of the programs/run.py into
core.py, since the only tests in programs_tests.py are for get_config
once they are moved into the more appropriate core module the
programs_tests module is empty and can be deleted.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
integration_tests.py: Skip on additional error

If a config file doesn't have a section for the external suites they
will raise an exception. This causes the tests to skip if there is a
NoSectionError

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
run.py: Split parser to parse config file first

This is groundwork for the next patch, basically it allows us to read
the config file, set defaults, and then parse the rest of the command
line arguments. This means that things like platform can have the
default set in the config file rather than being hard coded into the
source code.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
run_parser_tests.py: Add tests for some options in the run parser

This adds a couple of tests for the run parser to test behavior, these
tests will be used to confirm stable behavior in the next patch of the
series.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
framework: Add support for setting default platform in piglit.conf

This patch adds support to piglit.conf to set a default platform.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
arb_tessellation_shader: add compiler tests for barrier()

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>