about summary refs log tree commit diff stats
path: root/gyp_uv_link
diff options
context:
space:
mode:
authorFedor Indutny <fedor@indutny.com>2016-05-26 00:14:25 -0400
committerFedor Indutny <fedor@indutny.com>2016-05-26 00:14:25 -0400
commit9b0a792a84b8c6fca6f94c740061bdd46b502290 (patch)
treee115f3f7ee785aa772b62323ef6a7379e28644a8 /gyp_uv_link
parentc3f5553678546713d155eb379ecd33f2f34c4aeb (diff)
downloaduv_link_t-9b0a792a84b8c6fca6f94c740061bdd46b502290.tar.gz
test: basic test
Diffstat (limited to 'gyp_uv_link')
-rwxr-xr-xgyp_uv_link20
1 files changed, 7 insertions, 13 deletions
diff --git a/gyp_uv_link b/gyp_uv_link
index e174485..73251d6 100755
--- a/gyp_uv_link
+++ b/gyp_uv_link
@@ -52,20 +52,14 @@ def run_gyp(args):
 if __name__ == '__main__':
   args = sys.argv[1:]
 
-  # GYP bug.
-  # On msvs it will crash if it gets an absolute path.
-  # On Mac/make it will crash if it doesn't get an absolute path.
-  if sys.platform == 'win32':
-    args.append(os.path.join(root, 'uv_link_t.gyp'))
-    common_fn  = os.path.join(root, 'common.gypi')
-    options_fn = os.path.join(root, 'options.gypi')
-    # we force vs 2010 over 2008 which would otherwise be the default for gyp
-    if not os.environ.get('GYP_MSVS_VERSION'):
-      os.environ['GYP_MSVS_VERSION'] = '2010'
-  else:
+  if 'test' not in args:
     args.append(os.path.join(os.path.abspath(root), 'uv_link_t.gyp'))
-    common_fn  = os.path.join(os.path.abspath(root), 'common.gypi')
-    options_fn = os.path.join(os.path.abspath(root), 'options.gypi')
+  else:
+    args.append(os.path.join(os.path.abspath(root), 'test/test.gyp'))
+    args = filter(lambda arg: arg != 'test', args)
+
+  common_fn  = os.path.join(os.path.abspath(root), 'common.gypi')
+  options_fn = os.path.join(os.path.abspath(root), 'options.gypi')
 
   if os.path.exists(common_fn):
     args.extend(['-I', common_fn])