1. 31 Oct, 2018 1 commit
    • Daniel Vetter's avatar
      lib: Make libunwind optional again · 2908e4c6
      Daniel Vetter authored
      Apparently it's really not great to require it for a bunch of
      platforms. Requested by Sean and Eric.
      v2: Use combo option (Petri).
      v3: Fix the right option (Petri)
      v4: try a bit harder ...
      v5: Even more simplification (Dylan)
      Cc: Dylan Baker <dylan@pnwbakers.com>
      Cc: Petri Latvala <petri.latvala@intel.com>
      Reviewed-by: Eric Anholt <eric@anholt.net> (v1)
      Reviewed-by: Petri Latvala's avatarPetri Latvala <petri.latvala@intel.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: Eric Anholt <eric@anholt.net>
      Signed-off-by: Daniel Vetter's avatarDaniel Vetter <daniel.vetter@intel.com>
  2. 09 Aug, 2018 1 commit
    • Petri Latvala's avatar
      runner: New test runner · 18c1e752
      Petri Latvala authored
      This is a new test runner to replace piglit. Piglit has been very
      useful as a test runner, but certain improvements have been very
      difficult if possible at all in a generic test running framework.
      Important improvements over piglit:
      - Faster to launch. Being able to make assumptions about what we're
        executing makes it possible to save significant amounts of time. For
        example, a testlist file's line "igt@somebinary@somesubtest" already
        has all the information we need to construct the correct command
        line to execute that particular subtest, instead of listing all
        subtests of all test binaries and mapping them to command
        lines. Same goes for the regexp filters command line flags -t and
        -x; If we use -x somebinaryname, we don't need to list subtests from
        somebinaryname, we already know none of them will get executed.
      - Logs of incomplete tests. Piglit collects test output to memory and
        dumps them to a file when the test is complete. The new runner
        writes all output to disk immediately.
      - Ability to execute multiple subtests in one binary execution. This
        was possible with piglit, but its semantics made it very hard to
        implement in practice. For example, having a testlist file not only
        selected a subset of tests to run, but also mandated that they be
        executed in the same order.
      - Flexible timeout support. Instead of mandating a time tests cannot
        exceed, the new runner has a timeout on inactivity. Activity is
        any output on the test's stdout or stderr, or kernel activity via
      The runner is fairly piglit compatible. The command line is very
      similar, with a few additions. IGT_TEST_ROOT environment flag is still
      supported, but can also be set via command line (in place of igt.py in
      piglit command line).
      The results are a set of log files, processed into a piglit-compatible
      results.json file (BZ2 compression TODO). There are some new fields in
      the json for extra information:
      - "igt-version" contains the IGT version line. In
        multiple-subtests-mode the version information is only printed once,
        so it needs to be duplicated to all subtest results this way.
      - "dmesg-warnings" contains the dmesg lines that triggered a
        dmesg-warn/dmesg-fail state.
      - Runtime information will be different. Piglit takes a timestamp at
        the beginning and at the end of execution for runtime. The new
        runner uses the subtest output text. The binary execution time will
        also be included; The key "igt@somebinary" will have the runtime of
        the binary "somebinary", whereas "igt@somebinary@a" etc will have
        the runtime of the subtests. Substracting the subtest runtimes from
        the binary runtime yields the total time spent doing setup in
        igt_fixture blocks.
       - use clock handling from igt_core instead of copypaste
       - install results binary
       - less magic numbers
       - scanf doesn't give empty strings after all
       - use designated array initialization with _F_JOURNAL and pals
       - add more comments to dump_dmesg
       - use signal in kill_child instead of bool
       - use more 'usual' return values for execute_entry
       - use signal number instead of magic integers
       - use IGT_EXIT_INVALID instead of magic 79
       - properly remove files in clear_test_result_directory()
       - remove magic numbers
       - warn if results directory contains extra files
       - fix naming in matches_any
       - construct command line in a cleaner way in add_subtests()
       - clarify error in filtered_job_list
       - replace single string fprintfs with fputs
       - use getline() more sanely
       - refactor string constants to a shared header
       - explain non-nul-terminated string handling in resultgen
       - saner line parsing
       - rename gen_igt_name to generate_piglit_name
       - clean up parse_result_string
       - explain what we're parsing in resultgen
       - explain the runtime accumulation in add_runtime
       - refactor result overriding
       - stop passing needle sizes to find_line functions
       - refactor stdout/stderr parsing
       - fix regex whitelist compiling
       - add TODO for suppressions.txt
       - refactor dmesg parsing
       - fill_from_journal returns void
       - explain missing result fields with TODO comments
       - log_level parsing with typeof
       - pass stdout/stderr to usage() instead of a bool
       - fix absolute_path overflow
       - refactor settings serialization
       - remove maybe_strdup function
       - refactor job list serialization
       - refactor resuming, add new resume binary
       - catch mmap failure correctly
       - rename runner to igt_runner, etc
       - add meson option for building the runner
       - use UPPER_CASE names for string constants
       - add TODO comments for future refactoring
       - add a midding close()
       - const correctness where applicable
       - also build with autotools
      Signed-off-by: Petri Latvala's avatarPetri Latvala <petri.latvala@intel.com>
      Reviewed-by: Arkadiusz Hiler's avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
  3. 25 Jun, 2018 1 commit
    • Petri Latvala's avatar
      meson: Add options to control optional parts · 0e98bf69
      Petri Latvala authored
      Distributions want explicit control over optional parts so they can
      state runtime dependencies before building. Let's restore the
      functionality autotools used to provide.
      Where possible, the selection is done by choosing whether to build a
      particular item and the option name is build_$item. Example:
      build_overlay. Where not possible, the option name is
      with_$item. Example: with_valgrind.
      Array options require a bump of required meson version to 0.44. Debian
      stable has meson 0.37 which is already too old, stable-backports has
      0.45, CI uses 0.45. Mesa's meson requirement is 0.44.1, for a
      Note, the old hack for not building docs when cross-compiling is
      gone, as doc building can be explicitly controlled now.
      v2: glib not optional
      v3: bump meson version to 0.44
      Signed-off-by: Petri Latvala's avatarPetri Latvala <petri.latvala@intel.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
      Signed-off-by: Arkadiusz Hiler's avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
      Reviewed-by: Daniel Vetter's avatarDaniel Vetter <daniel.vetter@ffwll.ch>
  4. 12 Mar, 2018 1 commit
    • Petri Latvala's avatar
      meson: Set up runpath for installed executables · add8216d
      Petri Latvala authored
      Meson builds libigt as a shared library, and executables naturally
      have to find it at runtime. Using default options puts the library to
      a normal search paths, but any modifications to the directory options
      or a non-conventional prefix setting makes using LD_LIBRARY_PATH or
      other library search means mandatory.
      Add a build option 'use_rpath' (default: false) that makes meson set
      up DT_RUNPATH at install time, pointing to the library with a path
      relative to the executable, using $ORIGIN. That way the installed
      executables find the library even when not installed to exactly the
      build-time configured prefix path, a setup CI occasionally uses.
      Signed-off-by: Petri Latvala's avatarPetri Latvala <petri.latvala@intel.com>
      Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
      Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
      Acked-by: Daniel Vetter's avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: Arkadiusz Hiler's avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
      Tested-by: Arkadiusz Hiler's avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>