2017-09-12 21:25:43 +08:00
|
|
|
import os
|
|
|
|
|
|
|
|
WALL_TIME = "wall_time"
|
|
|
|
CPU_TIME = "cpu_time"
|
2017-09-13 22:57:15 +08:00
|
|
|
MAX_MEMORY = "max_memory"
|
2017-09-12 21:25:43 +08:00
|
|
|
|
|
|
|
DIR_PATH = os.path.dirname(os.path.realpath(__file__))
|
|
|
|
|
|
|
|
def get_absolute_path(path, base=""):
|
|
|
|
if base == "build":
|
2017-09-15 19:23:05 +08:00
|
|
|
extra = "../../build"
|
2017-09-12 21:25:43 +08:00
|
|
|
elif base == "build_release":
|
2017-09-15 19:23:05 +08:00
|
|
|
extra = "../../build_release"
|
2017-09-12 21:25:43 +08:00
|
|
|
elif base == "libs":
|
2017-09-15 19:23:05 +08:00
|
|
|
extra = "../../libs"
|
2017-09-12 21:25:43 +08:00
|
|
|
elif base == "config":
|
2017-09-15 19:23:05 +08:00
|
|
|
extra = "../../config"
|
2017-09-12 21:25:43 +08:00
|
|
|
else:
|
|
|
|
extra = ""
|
|
|
|
return os.path.normpath(os.path.join(DIR_PATH, extra, path))
|