#!/usr/bin/env python
# -*- coding: utf8 -*-
# test encoding: à-é-è-ô-ï-€
#
# runs a test as if it was installed
#   - fixes the python path in a dev environment
#   - creates a workspace folder

if __name__ == "__main__":
    import sys
    import os

    thisdir = os.path.split(os.path.abspath(__file__))[0]
    
    # look for fwk
    fwkdir = os.path.abspath(os.path.join(thisdir, '..', 'waves'))
    if not os.path.isdir(fwkdir):
        raise Exception(
            "'waves' not found - clone it next to fpm (from https://gitlab.uliege.be/am-dept/waves)")
    sys.path.append(fwkdir)

    # adds "." to the pythonpath (after waves so that waves is found first)
    sys.path.append(thisdir)

    import run  # maybe we should put the code of run in fwk....
    run.main(thisdir)