Skip to content
  • Dylan Baker's avatar
    piglit (executable): Make PIGLIT_SOURCE_DIR detection more robust · 4cf0576a
    Dylan Baker authored
    
    
    The initial implementation I committed was a bit hackish and I knew it
    at the time, but it seemed to work for all the cases that I tested.
    However, there were corner cases. The biggest of these cases is problems
    running out of tree with piglit built in tree.
    ex: src/piglit/piglit run ...
    
    This patch makes the handling more robust by explicitly searching for
    three distinct cases:
    1) piglit is run from the source dir, built in the source dir
    2) piglit is run from outside the source dir, built in the source dir
    3) piglit has been installed out of tree
    
    I have tested all three of these cases, and case 3 if piglit is
    installed as piglit.py.
    
    Signed-off-by: default avatarDylan Baker <baker.dylan.c@gmail.com>
    Reviewed-by: default avatarJose Fonseca <jfonseca@vmware.com>
    4cf0576a