mt-libuv 4.1.0 → 4.1.03
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/ext/Rakefile +1 -1
- data/ext/gyp/.gitignore +1 -0
- data/ext/gyp/AUTHORS +17 -0
- data/ext/gyp/DEPS +23 -0
- data/ext/gyp/LICENSE +27 -0
- data/ext/gyp/OWNERS +1 -0
- data/ext/gyp/PRESUBMIT.py +125 -0
- data/ext/gyp/README.md +5 -0
- data/ext/gyp/buildbot/buildbot_run.py +138 -0
- data/ext/gyp/buildbot/commit_queue/OWNERS +6 -0
- data/ext/gyp/buildbot/commit_queue/README +3 -0
- data/ext/gyp/buildbot/commit_queue/cq_config.json +15 -0
- data/ext/gyp/buildbot/travis-checkout.sh +27 -0
- data/ext/gyp/buildbot/travis-test.sh +12 -0
- data/ext/gyp/codereview.settings +6 -0
- data/ext/gyp/data/win/large-pdb-shim.cc +12 -0
- data/ext/gyp/gyp +8 -0
- data/ext/gyp/gyp.bat +5 -0
- data/ext/gyp/gyp_main.py +16 -0
- data/ext/gyp/gyptest.py +243 -0
- data/ext/gyp/pylib/gyp/MSVSNew.py +353 -0
- data/ext/gyp/pylib/gyp/MSVSProject.py +208 -0
- data/ext/gyp/pylib/gyp/MSVSSettings.py +1106 -0
- data/ext/gyp/pylib/gyp/MSVSSettings_test.py +1486 -0
- data/ext/gyp/pylib/gyp/MSVSToolFile.py +58 -0
- data/ext/gyp/pylib/gyp/MSVSUserFile.py +147 -0
- data/ext/gyp/pylib/gyp/MSVSUtil.py +271 -0
- data/ext/gyp/pylib/gyp/MSVSVersion.py +504 -0
- data/ext/gyp/pylib/gyp/__init__.py +555 -0
- data/ext/gyp/pylib/gyp/common.py +619 -0
- data/ext/gyp/pylib/gyp/common_test.py +73 -0
- data/ext/gyp/pylib/gyp/easy_xml.py +170 -0
- data/ext/gyp/pylib/gyp/easy_xml_test.py +106 -0
- data/ext/gyp/pylib/gyp/flock_tool.py +54 -0
- data/ext/gyp/pylib/gyp/generator/__init__.py +0 -0
- data/ext/gyp/pylib/gyp/generator/analyzer.py +744 -0
- data/ext/gyp/pylib/gyp/generator/cmake.py +1256 -0
- data/ext/gyp/pylib/gyp/generator/dump_dependency_json.py +101 -0
- data/ext/gyp/pylib/gyp/generator/eclipse.py +425 -0
- data/ext/gyp/pylib/gyp/generator/gypd.py +94 -0
- data/ext/gyp/pylib/gyp/generator/gypsh.py +56 -0
- data/ext/gyp/pylib/gyp/generator/make.py +2260 -0
- data/ext/gyp/pylib/gyp/generator/msvs.py +3537 -0
- data/ext/gyp/pylib/gyp/generator/msvs_test.py +40 -0
- data/ext/gyp/pylib/gyp/generator/ninja.py +2500 -0
- data/ext/gyp/pylib/gyp/generator/ninja_test.py +46 -0
- data/ext/gyp/pylib/gyp/generator/xcode.py +1302 -0
- data/ext/gyp/pylib/gyp/generator/xcode_test.py +23 -0
- data/ext/gyp/pylib/gyp/input.py +2908 -0
- data/ext/gyp/pylib/gyp/input_test.py +90 -0
- data/ext/gyp/pylib/gyp/mac_tool.py +721 -0
- data/ext/gyp/pylib/gyp/msvs_emulation.py +1112 -0
- data/ext/gyp/pylib/gyp/ninja_syntax.py +168 -0
- data/ext/gyp/pylib/gyp/simple_copy.py +57 -0
- data/ext/gyp/pylib/gyp/win_tool.py +326 -0
- data/ext/gyp/pylib/gyp/xcode_emulation.py +1800 -0
- data/ext/gyp/pylib/gyp/xcode_ninja.py +289 -0
- data/ext/gyp/pylib/gyp/xcodeproj_file.py +2995 -0
- data/ext/gyp/pylib/gyp/xml_fix.py +68 -0
- data/ext/gyp/samples/samples +83 -0
- data/ext/gyp/samples/samples.bat +5 -0
- data/ext/gyp/setup.py +19 -0
- data/ext/gyp/test/actions/generated-header/action.py +11 -0
- data/ext/gyp/test/actions/generated-header/main.cc +7 -0
- data/ext/gyp/test/actions/generated-header/test.gyp +34 -0
- data/ext/gyp/test/actions/gyptest-all.py +101 -0
- data/ext/gyp/test/actions/gyptest-default.py +68 -0
- data/ext/gyp/test/actions/gyptest-errors.py +24 -0
- data/ext/gyp/test/actions/gyptest-generated-header.py +38 -0
- data/ext/gyp/test/actions/src/action_missing_name.gyp +24 -0
- data/ext/gyp/test/actions/src/actions.gyp +114 -0
- data/ext/gyp/test/actions/src/confirm-dep-files.py +21 -0
- data/ext/gyp/test/actions/src/subdir1/counter.py +44 -0
- data/ext/gyp/test/actions/src/subdir1/executable.gyp +74 -0
- data/ext/gyp/test/actions/src/subdir1/make-prog1.py +20 -0
- data/ext/gyp/test/actions/src/subdir1/make-prog2.py +20 -0
- data/ext/gyp/test/actions/src/subdir1/program.c +12 -0
- data/ext/gyp/test/actions/src/subdir2/make-file.py +11 -0
- data/ext/gyp/test/actions/src/subdir2/none.gyp +33 -0
- data/ext/gyp/test/actions/src/subdir3/generate_main.py +21 -0
- data/ext/gyp/test/actions/src/subdir3/null_input.gyp +29 -0
- data/ext/gyp/test/actions-bare/gyptest-bare.py +24 -0
- data/ext/gyp/test/actions-bare/src/bare.gyp +25 -0
- data/ext/gyp/test/actions-bare/src/bare.py +11 -0
- data/ext/gyp/test/actions-depfile/depfile.gyp +42 -0
- data/ext/gyp/test/actions-depfile/gyptest-all.py +30 -0
- data/ext/gyp/test/actions-depfile/input.txt +1 -0
- data/ext/gyp/test/actions-depfile/touch.py +18 -0
- data/ext/gyp/test/actions-multiple/gyptest-all.py +72 -0
- data/ext/gyp/test/actions-multiple/src/actions.gyp +226 -0
- data/ext/gyp/test/actions-multiple/src/copyfile.py +9 -0
- data/ext/gyp/test/actions-multiple/src/filter.py +12 -0
- data/ext/gyp/test/actions-multiple/src/foo.c +11 -0
- data/ext/gyp/test/actions-multiple/src/input.txt +1 -0
- data/ext/gyp/test/actions-multiple/src/main.c +22 -0
- data/ext/gyp/test/actions-multiple-outputs/gyptest-multiple-outputs.py +45 -0
- data/ext/gyp/test/actions-multiple-outputs/src/multiple-outputs.gyp +23 -0
- data/ext/gyp/test/actions-multiple-outputs/src/touch.py +16 -0
- data/ext/gyp/test/actions-multiple-outputs-with-dependencies/gyptest-action.py +45 -0
- data/ext/gyp/test/actions-multiple-outputs-with-dependencies/src/action.gyp +28 -0
- data/ext/gyp/test/actions-multiple-outputs-with-dependencies/src/rcopy.py +20 -0
- data/ext/gyp/test/actions-none/gyptest-none.py +24 -0
- data/ext/gyp/test/actions-none/src/fake_cross.py +12 -0
- data/ext/gyp/test/actions-none/src/foo.cc +1 -0
- data/ext/gyp/test/actions-none/src/none_with_source_files.gyp +35 -0
- data/ext/gyp/test/actions-subdir/gyptest-action.py +26 -0
- data/ext/gyp/test/actions-subdir/src/make-file.py +11 -0
- data/ext/gyp/test/actions-subdir/src/none.gyp +31 -0
- data/ext/gyp/test/actions-subdir/src/subdir/make-subdir-file.py +11 -0
- data/ext/gyp/test/actions-subdir/src/subdir/subdir.gyp +28 -0
- data/ext/gyp/test/additional-targets/gyptest-additional.py +63 -0
- data/ext/gyp/test/additional-targets/src/all.gyp +13 -0
- data/ext/gyp/test/additional-targets/src/dir1/actions.gyp +56 -0
- data/ext/gyp/test/additional-targets/src/dir1/emit.py +11 -0
- data/ext/gyp/test/additional-targets/src/dir1/lib1.c +6 -0
- data/ext/gyp/test/analyzer/common.gypi +6 -0
- data/ext/gyp/test/analyzer/gyptest-analyzer.py +427 -0
- data/ext/gyp/test/analyzer/static_library_test.gyp +34 -0
- data/ext/gyp/test/analyzer/subdir/subdir.gyp +36 -0
- data/ext/gyp/test/analyzer/subdir/subdir2/subdir2.gyp +15 -0
- data/ext/gyp/test/analyzer/subdir2/subdir.gyp +18 -0
- data/ext/gyp/test/analyzer/subdir2/subdir.includes.gypi +9 -0
- data/ext/gyp/test/analyzer/test.gyp +114 -0
- data/ext/gyp/test/analyzer/test2.gyp +25 -0
- data/ext/gyp/test/analyzer/test2.includes.gypi +13 -0
- data/ext/gyp/test/analyzer/test2.includes.includes.gypi +9 -0
- data/ext/gyp/test/analyzer/test2.toplevel_includes.gypi +15 -0
- data/ext/gyp/test/analyzer/test3.gyp +77 -0
- data/ext/gyp/test/analyzer/test4.gyp +80 -0
- data/ext/gyp/test/analyzer/test5.gyp +25 -0
- data/ext/gyp/test/arflags/gyptest-arflags.py +26 -0
- data/ext/gyp/test/arflags/lib.cc +0 -0
- data/ext/gyp/test/arflags/test.gyp +10 -0
- data/ext/gyp/test/assembly/gyptest-assembly.py +31 -0
- data/ext/gyp/test/assembly/gyptest-override.py +24 -0
- data/ext/gyp/test/assembly/src/as.bat +4 -0
- data/ext/gyp/test/assembly/src/assembly.gyp +62 -0
- data/ext/gyp/test/assembly/src/lib1.S +15 -0
- data/ext/gyp/test/assembly/src/lib1.c +3 -0
- data/ext/gyp/test/assembly/src/override.gyp +34 -0
- data/ext/gyp/test/assembly/src/override_asm.asm +8 -0
- data/ext/gyp/test/assembly/src/program.c +12 -0
- data/ext/gyp/test/build-option/gyptest-build.py +27 -0
- data/ext/gyp/test/build-option/hello.c +13 -0
- data/ext/gyp/test/build-option/hello.gyp +15 -0
- data/ext/gyp/test/builddir/gyptest-all.py +85 -0
- data/ext/gyp/test/builddir/gyptest-default.py +85 -0
- data/ext/gyp/test/builddir/src/builddir.gypi +18 -0
- data/ext/gyp/test/builddir/src/func1.c +6 -0
- data/ext/gyp/test/builddir/src/func2.c +6 -0
- data/ext/gyp/test/builddir/src/func3.c +6 -0
- data/ext/gyp/test/builddir/src/func4.c +6 -0
- data/ext/gyp/test/builddir/src/func5.c +6 -0
- data/ext/gyp/test/builddir/src/prog1.c +10 -0
- data/ext/gyp/test/builddir/src/prog1.gyp +30 -0
- data/ext/gyp/test/builddir/src/subdir2/prog2.c +10 -0
- data/ext/gyp/test/builddir/src/subdir2/prog2.gyp +19 -0
- data/ext/gyp/test/builddir/src/subdir2/subdir3/prog3.c +10 -0
- data/ext/gyp/test/builddir/src/subdir2/subdir3/prog3.gyp +19 -0
- data/ext/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.c +10 -0
- data/ext/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.gyp +19 -0
- data/ext/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.c +10 -0
- data/ext/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.gyp +19 -0
- data/ext/gyp/test/cflags/cflags.c +15 -0
- data/ext/gyp/test/cflags/cflags.gyp +23 -0
- data/ext/gyp/test/cflags/gyptest-cflags.py +75 -0
- data/ext/gyp/test/compilable/gyptest-headers.py +29 -0
- data/ext/gyp/test/compilable/src/headers.gyp +26 -0
- data/ext/gyp/test/compilable/src/lib1.cpp +7 -0
- data/ext/gyp/test/compilable/src/lib1.hpp +6 -0
- data/ext/gyp/test/compilable/src/program.cpp +9 -0
- data/ext/gyp/test/compiler-override/compiler-exe.gyp +16 -0
- data/ext/gyp/test/compiler-override/compiler-global-settings.gyp.in +34 -0
- data/ext/gyp/test/compiler-override/compiler-host.gyp +17 -0
- data/ext/gyp/test/compiler-override/compiler-shared-lib.gyp +16 -0
- data/ext/gyp/test/compiler-override/cxxtest.cc +7 -0
- data/ext/gyp/test/compiler-override/gyptest-compiler-env-toolchain.py +78 -0
- data/ext/gyp/test/compiler-override/gyptest-compiler-env.py +110 -0
- data/ext/gyp/test/compiler-override/gyptest-compiler-global-settings.py +82 -0
- data/ext/gyp/test/compiler-override/my_cc.py +7 -0
- data/ext/gyp/test/compiler-override/my_cxx.py +7 -0
- data/ext/gyp/test/compiler-override/my_ld.py +7 -0
- data/ext/gyp/test/compiler-override/my_nm.py +9 -0
- data/ext/gyp/test/compiler-override/my_readelf.py +9 -0
- data/ext/gyp/test/compiler-override/test.c +7 -0
- data/ext/gyp/test/conditions/elseif/elseif.gyp +43 -0
- data/ext/gyp/test/conditions/elseif/elseif_bad1.gyp +20 -0
- data/ext/gyp/test/conditions/elseif/elseif_bad2.gyp +22 -0
- data/ext/gyp/test/conditions/elseif/elseif_bad3.gyp +23 -0
- data/ext/gyp/test/conditions/elseif/elseif_conditions.gypi +15 -0
- data/ext/gyp/test/conditions/elseif/gyptest_elseif.py +33 -0
- data/ext/gyp/test/conditions/elseif/program.cc +10 -0
- data/ext/gyp/test/configurations/basics/configurations.c +15 -0
- data/ext/gyp/test/configurations/basics/configurations.gyp +32 -0
- data/ext/gyp/test/configurations/basics/gyptest-configurations.py +29 -0
- data/ext/gyp/test/configurations/inheritance/configurations.c +21 -0
- data/ext/gyp/test/configurations/inheritance/configurations.gyp +40 -0
- data/ext/gyp/test/configurations/inheritance/duplicates.gyp +27 -0
- data/ext/gyp/test/configurations/inheritance/duplicates.gypd.golden +12 -0
- data/ext/gyp/test/configurations/inheritance/gyptest-duplicates.py +36 -0
- data/ext/gyp/test/configurations/inheritance/gyptest-inheritance.py +33 -0
- data/ext/gyp/test/configurations/invalid/actions.gyp +18 -0
- data/ext/gyp/test/configurations/invalid/all_dependent_settings.gyp +18 -0
- data/ext/gyp/test/configurations/invalid/configurations.gyp +18 -0
- data/ext/gyp/test/configurations/invalid/dependencies.gyp +18 -0
- data/ext/gyp/test/configurations/invalid/direct_dependent_settings.gyp +18 -0
- data/ext/gyp/test/configurations/invalid/gyptest-configurations.py +36 -0
- data/ext/gyp/test/configurations/invalid/libraries.gyp +18 -0
- data/ext/gyp/test/configurations/invalid/link_settings.gyp +18 -0
- data/ext/gyp/test/configurations/invalid/sources.gyp +18 -0
- data/ext/gyp/test/configurations/invalid/standalone_static_library.gyp +17 -0
- data/ext/gyp/test/configurations/invalid/target_name.gyp +18 -0
- data/ext/gyp/test/configurations/invalid/type.gyp +18 -0
- data/ext/gyp/test/configurations/target_platform/configurations.gyp +58 -0
- data/ext/gyp/test/configurations/target_platform/front.c +8 -0
- data/ext/gyp/test/configurations/target_platform/gyptest-target_platform.py +40 -0
- data/ext/gyp/test/configurations/target_platform/left.c +3 -0
- data/ext/gyp/test/configurations/target_platform/right.c +3 -0
- data/ext/gyp/test/configurations/x64/configurations.c +12 -0
- data/ext/gyp/test/configurations/x64/configurations.gyp +38 -0
- data/ext/gyp/test/configurations/x64/gyptest-x86.py +31 -0
- data/ext/gyp/test/copies/gyptest-all.py +42 -0
- data/ext/gyp/test/copies/gyptest-attribs.py +41 -0
- data/ext/gyp/test/copies/gyptest-default.py +42 -0
- data/ext/gyp/test/copies/gyptest-samedir.py +28 -0
- data/ext/gyp/test/copies/gyptest-slash.py +39 -0
- data/ext/gyp/test/copies/gyptest-sourceless-shared-lib.py +20 -0
- data/ext/gyp/test/copies/gyptest-updir.py +32 -0
- data/ext/gyp/test/copies/src/copies-attribs.gyp +20 -0
- data/ext/gyp/test/copies/src/copies-samedir.gyp +37 -0
- data/ext/gyp/test/copies/src/copies-slash.gyp +36 -0
- data/ext/gyp/test/copies/src/copies-sourceless-shared-lib.gyp +27 -0
- data/ext/gyp/test/copies/src/copies-updir.gyp +21 -0
- data/ext/gyp/test/copies/src/copies.gyp +70 -0
- data/ext/gyp/test/copies/src/directory/file3 +1 -0
- data/ext/gyp/test/copies/src/directory/file4 +1 -0
- data/ext/gyp/test/copies/src/directory/subdir/file5 +1 -0
- data/ext/gyp/test/copies/src/executable-file.sh +3 -0
- data/ext/gyp/test/copies/src/file1 +1 -0
- data/ext/gyp/test/copies/src/file2 +1 -0
- data/ext/gyp/test/copies/src/foo.c +13 -0
- data/ext/gyp/test/copies/src/parentdir/subdir/file6 +1 -0
- data/ext/gyp/test/custom-generator/gyptest-custom-generator.py +18 -0
- data/ext/gyp/test/custom-generator/mygenerator.py +14 -0
- data/ext/gyp/test/custom-generator/test.gyp +15 -0
- data/ext/gyp/test/cxxflags/cxxflags.cc +15 -0
- data/ext/gyp/test/cxxflags/cxxflags.gyp +15 -0
- data/ext/gyp/test/cxxflags/gyptest-cxxflags.py +45 -0
- data/ext/gyp/test/defines/defines-env.gyp +22 -0
- data/ext/gyp/test/defines/defines.c +23 -0
- data/ext/gyp/test/defines/defines.gyp +38 -0
- data/ext/gyp/test/defines/gyptest-define-override.py +43 -0
- data/ext/gyp/test/defines/gyptest-defines-env-regyp.py +51 -0
- data/ext/gyp/test/defines/gyptest-defines-env.py +85 -0
- data/ext/gyp/test/defines/gyptest-defines.py +39 -0
- data/ext/gyp/test/defines-escaping/defines-escaping.c +11 -0
- data/ext/gyp/test/defines-escaping/defines-escaping.gyp +19 -0
- data/ext/gyp/test/defines-escaping/gyptest-defines-escaping.py +184 -0
- data/ext/gyp/test/dependencies/a.c +9 -0
- data/ext/gyp/test/dependencies/adso/all_dependent_settings_order.gyp +45 -0
- data/ext/gyp/test/dependencies/adso/write_args.py +11 -0
- data/ext/gyp/test/dependencies/b/b.c +3 -0
- data/ext/gyp/test/dependencies/b/b.gyp +22 -0
- data/ext/gyp/test/dependencies/b/b3.c +9 -0
- data/ext/gyp/test/dependencies/c/c.c +4 -0
- data/ext/gyp/test/dependencies/c/c.gyp +22 -0
- data/ext/gyp/test/dependencies/c/d.c +3 -0
- data/ext/gyp/test/dependencies/double_dependency.gyp +23 -0
- data/ext/gyp/test/dependencies/double_dependent.gyp +12 -0
- data/ext/gyp/test/dependencies/extra_targets.gyp +18 -0
- data/ext/gyp/test/dependencies/gyptest-all-dependent-settings-order.py +19 -0
- data/ext/gyp/test/dependencies/gyptest-double-dependency.py +19 -0
- data/ext/gyp/test/dependencies/gyptest-extra-targets.py +22 -0
- data/ext/gyp/test/dependencies/gyptest-indirect-module-dependency.py +22 -0
- data/ext/gyp/test/dependencies/gyptest-lib-only.py +39 -0
- data/ext/gyp/test/dependencies/gyptest-none-traversal.py +25 -0
- data/ext/gyp/test/dependencies/gyptest-sharedlib-linksettings.py +21 -0
- data/ext/gyp/test/dependencies/lib_only.gyp +16 -0
- data/ext/gyp/test/dependencies/main.c +14 -0
- data/ext/gyp/test/dependencies/module-dep/a.cc +7 -0
- data/ext/gyp/test/dependencies/module-dep/dll.cc +9 -0
- data/ext/gyp/test/dependencies/module-dep/exe.cc +7 -0
- data/ext/gyp/test/dependencies/module-dep/indirect-module-dependency.gyp +37 -0
- data/ext/gyp/test/dependencies/none_traversal.gyp +46 -0
- data/ext/gyp/test/dependencies/sharedlib-linksettings/program.c +25 -0
- data/ext/gyp/test/dependencies/sharedlib-linksettings/sharedlib.c +16 -0
- data/ext/gyp/test/dependencies/sharedlib-linksettings/staticlib.c +24 -0
- data/ext/gyp/test/dependencies/sharedlib-linksettings/test.gyp +37 -0
- data/ext/gyp/test/dependency-copy/gyptest-copy.py +26 -0
- data/ext/gyp/test/dependency-copy/src/copies.gyp +25 -0
- data/ext/gyp/test/dependency-copy/src/file1.c +7 -0
- data/ext/gyp/test/dependency-copy/src/file2.c +7 -0
- data/ext/gyp/test/dependent-settings/nested-dependent-settings/all-dependent-settings.gyp +19 -0
- data/ext/gyp/test/dependent-settings/nested-dependent-settings/direct-dependent-settings.gyp +19 -0
- data/ext/gyp/test/dependent-settings/nested-dependent-settings/gyptest-nested-dependent-settings.py +18 -0
- data/ext/gyp/test/determinism/determinism.gyp +59 -0
- data/ext/gyp/test/determinism/empty-targets.gyp +32 -0
- data/ext/gyp/test/determinism/gyptest-determinism.py +30 -0
- data/ext/gyp/test/determinism/gyptest-empty-target-names.py +30 -0
- data/ext/gyp/test/determinism/gyptest-needed-variables.py +30 -0
- data/ext/gyp/test/determinism/gyptest-solibs.py +37 -0
- data/ext/gyp/test/determinism/main.cc +5 -0
- data/ext/gyp/test/determinism/needed-variables.gyp +33 -0
- data/ext/gyp/test/determinism/rule.py +8 -0
- data/ext/gyp/test/determinism/solib.cc +8 -0
- data/ext/gyp/test/determinism/solibs.gyp +32 -0
- data/ext/gyp/test/empty-target/empty-target.gyp +12 -0
- data/ext/gyp/test/empty-target/gyptest-empty-target.py +18 -0
- data/ext/gyp/test/errors/dependency_cycle.gyp +23 -0
- data/ext/gyp/test/errors/duplicate_basenames.gyp +13 -0
- data/ext/gyp/test/errors/duplicate_node.gyp +12 -0
- data/ext/gyp/test/errors/duplicate_rule.gyp +22 -0
- data/ext/gyp/test/errors/duplicate_targets.gyp +14 -0
- data/ext/gyp/test/errors/error_command.gyp +12 -0
- data/ext/gyp/test/errors/file_cycle0.gyp +17 -0
- data/ext/gyp/test/errors/file_cycle1.gyp +13 -0
- data/ext/gyp/test/errors/gyptest-errors.py +80 -0
- data/ext/gyp/test/errors/missing_command.gyp +12 -0
- data/ext/gyp/test/errors/missing_dep.gyp +15 -0
- data/ext/gyp/test/errors/missing_targets.gyp +8 -0
- data/ext/gyp/test/escaping/colon/test.gyp +21 -0
- data/ext/gyp/test/escaping/gyptest-colon.py +51 -0
- data/ext/gyp/test/exclusion/exclusion.gyp +23 -0
- data/ext/gyp/test/exclusion/gyptest-exclusion.py +22 -0
- data/ext/gyp/test/exclusion/hello.c +15 -0
- data/ext/gyp/test/external-cross-compile/gyptest-cross.py +31 -0
- data/ext/gyp/test/external-cross-compile/src/bogus1.cc +1 -0
- data/ext/gyp/test/external-cross-compile/src/bogus2.c +1 -0
- data/ext/gyp/test/external-cross-compile/src/cross.gyp +83 -0
- data/ext/gyp/test/external-cross-compile/src/cross_compile.gypi +23 -0
- data/ext/gyp/test/external-cross-compile/src/fake_cross.py +18 -0
- data/ext/gyp/test/external-cross-compile/src/program.cc +16 -0
- data/ext/gyp/test/external-cross-compile/src/test1.cc +1 -0
- data/ext/gyp/test/external-cross-compile/src/test2.c +1 -0
- data/ext/gyp/test/external-cross-compile/src/test3.cc +1 -0
- data/ext/gyp/test/external-cross-compile/src/test4.c +1 -0
- data/ext/gyp/test/external-cross-compile/src/tochar.py +13 -0
- data/ext/gyp/test/generator-output/actions/actions.gyp +16 -0
- data/ext/gyp/test/generator-output/actions/build/README.txt +4 -0
- data/ext/gyp/test/generator-output/actions/subdir1/actions-out/README.txt +4 -0
- data/ext/gyp/test/generator-output/actions/subdir1/build/README.txt +4 -0
- data/ext/gyp/test/generator-output/actions/subdir1/executable.gyp +44 -0
- data/ext/gyp/test/generator-output/actions/subdir1/make-prog1.py +20 -0
- data/ext/gyp/test/generator-output/actions/subdir1/make-prog2.py +20 -0
- data/ext/gyp/test/generator-output/actions/subdir1/program.c +12 -0
- data/ext/gyp/test/generator-output/actions/subdir2/actions-out/README.txt +4 -0
- data/ext/gyp/test/generator-output/actions/subdir2/build/README.txt +4 -0
- data/ext/gyp/test/generator-output/actions/subdir2/make-file.py +11 -0
- data/ext/gyp/test/generator-output/actions/subdir2/none.gyp +31 -0
- data/ext/gyp/test/generator-output/copies/build/README.txt +4 -0
- data/ext/gyp/test/generator-output/copies/copies-out/README.txt +4 -0
- data/ext/gyp/test/generator-output/copies/copies.gyp +50 -0
- data/ext/gyp/test/generator-output/copies/file1 +1 -0
- data/ext/gyp/test/generator-output/copies/file2 +1 -0
- data/ext/gyp/test/generator-output/copies/subdir/build/README.txt +4 -0
- data/ext/gyp/test/generator-output/copies/subdir/copies-out/README.txt +4 -0
- data/ext/gyp/test/generator-output/copies/subdir/file3 +1 -0
- data/ext/gyp/test/generator-output/copies/subdir/file4 +1 -0
- data/ext/gyp/test/generator-output/copies/subdir/subdir.gyp +32 -0
- data/ext/gyp/test/generator-output/gyptest-actions.py +57 -0
- data/ext/gyp/test/generator-output/gyptest-copies.py +59 -0
- data/ext/gyp/test/generator-output/gyptest-depth.py +58 -0
- data/ext/gyp/test/generator-output/gyptest-mac-bundle.py +33 -0
- data/ext/gyp/test/generator-output/gyptest-relocate.py +59 -0
- data/ext/gyp/test/generator-output/gyptest-rules.py +58 -0
- data/ext/gyp/test/generator-output/gyptest-subdir2-deep.py +36 -0
- data/ext/gyp/test/generator-output/gyptest-symlink.py +44 -0
- data/ext/gyp/test/generator-output/gyptest-top-all.py +53 -0
- data/ext/gyp/test/generator-output/mac-bundle/Info.plist +32 -0
- data/ext/gyp/test/generator-output/mac-bundle/app.order +1 -0
- data/ext/gyp/test/generator-output/mac-bundle/header.h +1 -0
- data/ext/gyp/test/generator-output/mac-bundle/main.c +1 -0
- data/ext/gyp/test/generator-output/mac-bundle/resource.sb +1 -0
- data/ext/gyp/test/generator-output/mac-bundle/test.gyp +25 -0
- data/ext/gyp/test/generator-output/rules/build/README.txt +4 -0
- data/ext/gyp/test/generator-output/rules/copy-file.py +12 -0
- data/ext/gyp/test/generator-output/rules/rules.gyp +16 -0
- data/ext/gyp/test/generator-output/rules/subdir1/build/README.txt +4 -0
- data/ext/gyp/test/generator-output/rules/subdir1/define3.in0 +1 -0
- data/ext/gyp/test/generator-output/rules/subdir1/define4.in0 +1 -0
- data/ext/gyp/test/generator-output/rules/subdir1/executable.gyp +59 -0
- data/ext/gyp/test/generator-output/rules/subdir1/function1.in1 +6 -0
- data/ext/gyp/test/generator-output/rules/subdir1/function2.in1 +6 -0
- data/ext/gyp/test/generator-output/rules/subdir1/program.c +18 -0
- data/ext/gyp/test/generator-output/rules/subdir2/build/README.txt +4 -0
- data/ext/gyp/test/generator-output/rules/subdir2/file1.in0 +1 -0
- data/ext/gyp/test/generator-output/rules/subdir2/file2.in0 +1 -0
- data/ext/gyp/test/generator-output/rules/subdir2/file3.in1 +1 -0
- data/ext/gyp/test/generator-output/rules/subdir2/file4.in1 +1 -0
- data/ext/gyp/test/generator-output/rules/subdir2/none.gyp +49 -0
- data/ext/gyp/test/generator-output/rules/subdir2/rules-out/README.txt +4 -0
- data/ext/gyp/test/generator-output/src/build/README.txt +4 -0
- data/ext/gyp/test/generator-output/src/inc.h +1 -0
- data/ext/gyp/test/generator-output/src/inc1/include1.h +1 -0
- data/ext/gyp/test/generator-output/src/prog1.c +18 -0
- data/ext/gyp/test/generator-output/src/prog1.gyp +28 -0
- data/ext/gyp/test/generator-output/src/subdir2/build/README.txt +4 -0
- data/ext/gyp/test/generator-output/src/subdir2/deeper/build/README.txt +4 -0
- data/ext/gyp/test/generator-output/src/subdir2/deeper/deeper.c +7 -0
- data/ext/gyp/test/generator-output/src/subdir2/deeper/deeper.gyp +18 -0
- data/ext/gyp/test/generator-output/src/subdir2/deeper/deeper.h +1 -0
- data/ext/gyp/test/generator-output/src/subdir2/inc2/include2.h +1 -0
- data/ext/gyp/test/generator-output/src/subdir2/prog2.c +18 -0
- data/ext/gyp/test/generator-output/src/subdir2/prog2.gyp +28 -0
- data/ext/gyp/test/generator-output/src/subdir3/build/README.txt +4 -0
- data/ext/gyp/test/generator-output/src/subdir3/inc3/include3.h +1 -0
- data/ext/gyp/test/generator-output/src/subdir3/prog3.c +18 -0
- data/ext/gyp/test/generator-output/src/subdir3/prog3.gyp +25 -0
- data/ext/gyp/test/generator-output/src/symroot.gypi +16 -0
- data/ext/gyp/test/gyp-defines/defines.gyp +26 -0
- data/ext/gyp/test/gyp-defines/echo.py +11 -0
- data/ext/gyp/test/gyp-defines/gyptest-multiple-values.py +36 -0
- data/ext/gyp/test/gyp-defines/gyptest-regyp.py +40 -0
- data/ext/gyp/test/hard_dependency/gyptest-exported-hard-dependency.py +37 -0
- data/ext/gyp/test/hard_dependency/gyptest-no-exported-hard-dependency.py +36 -0
- data/ext/gyp/test/hard_dependency/src/a.c +9 -0
- data/ext/gyp/test/hard_dependency/src/a.h +12 -0
- data/ext/gyp/test/hard_dependency/src/b.c +9 -0
- data/ext/gyp/test/hard_dependency/src/b.h +12 -0
- data/ext/gyp/test/hard_dependency/src/c.c +10 -0
- data/ext/gyp/test/hard_dependency/src/c.h +10 -0
- data/ext/gyp/test/hard_dependency/src/d.c +9 -0
- data/ext/gyp/test/hard_dependency/src/emit.py +11 -0
- data/ext/gyp/test/hard_dependency/src/hard_dependency.gyp +78 -0
- data/ext/gyp/test/hello/gyptest-all.py +24 -0
- data/ext/gyp/test/hello/gyptest-default.py +24 -0
- data/ext/gyp/test/hello/gyptest-disable-regyp.py +32 -0
- data/ext/gyp/test/hello/gyptest-regyp-output.py +36 -0
- data/ext/gyp/test/hello/gyptest-regyp.py +32 -0
- data/ext/gyp/test/hello/gyptest-target.py +24 -0
- data/ext/gyp/test/hello/hello.c +11 -0
- data/ext/gyp/test/hello/hello.gyp +15 -0
- data/ext/gyp/test/hello/hello2.c +11 -0
- data/ext/gyp/test/hello/hello2.gyp +15 -0
- data/ext/gyp/test/home_dot_gyp/gyptest-home-includes-config-arg.py +31 -0
- data/ext/gyp/test/home_dot_gyp/gyptest-home-includes-config-env.py +33 -0
- data/ext/gyp/test/home_dot_gyp/gyptest-home-includes-regyp.py +44 -0
- data/ext/gyp/test/home_dot_gyp/gyptest-home-includes.py +30 -0
- data/ext/gyp/test/home_dot_gyp/home/.gyp/include.gypi +5 -0
- data/ext/gyp/test/home_dot_gyp/home2/.gyp/include.gypi +5 -0
- data/ext/gyp/test/home_dot_gyp/home2/.gyp_new/include.gypi +5 -0
- data/ext/gyp/test/home_dot_gyp/src/all.gyp +22 -0
- data/ext/gyp/test/home_dot_gyp/src/printfoo.c +7 -0
- data/ext/gyp/test/include_dirs/gyptest-all.py +43 -0
- data/ext/gyp/test/include_dirs/gyptest-default.py +43 -0
- data/ext/gyp/test/include_dirs/src/inc.h +1 -0
- data/ext/gyp/test/include_dirs/src/inc1/include1.h +1 -0
- data/ext/gyp/test/include_dirs/src/includes.c +19 -0
- data/ext/gyp/test/include_dirs/src/includes.gyp +27 -0
- data/ext/gyp/test/include_dirs/src/shadow1/shadow.h +1 -0
- data/ext/gyp/test/include_dirs/src/shadow2/shadow.h +1 -0
- data/ext/gyp/test/include_dirs/src/subdir/inc.h +1 -0
- data/ext/gyp/test/include_dirs/src/subdir/inc2/include2.h +1 -0
- data/ext/gyp/test/include_dirs/src/subdir/subdir_includes.c +14 -0
- data/ext/gyp/test/include_dirs/src/subdir/subdir_includes.gyp +20 -0
- data/ext/gyp/test/intermediate_dir/gyptest-intermediate-dir.py +44 -0
- data/ext/gyp/test/intermediate_dir/src/script.py +22 -0
- data/ext/gyp/test/intermediate_dir/src/shared_infile.txt +1 -0
- data/ext/gyp/test/intermediate_dir/src/test.gyp +42 -0
- data/ext/gyp/test/intermediate_dir/src/test2.gyp +42 -0
- data/ext/gyp/test/ios/app-bundle/TestApp/English.lproj/InfoPlist-error.strings +3 -0
- data/ext/gyp/test/ios/app-bundle/TestApp/English.lproj/InfoPlist.strings +3 -0
- data/ext/gyp/test/ios/app-bundle/TestApp/English.lproj/LanguageMap.plist +8 -0
- data/ext/gyp/test/ios/app-bundle/TestApp/English.lproj/MainMenu.xib +17 -0
- data/ext/gyp/test/ios/app-bundle/TestApp/English.lproj/Main_iPhone.storyboard +27 -0
- data/ext/gyp/test/ios/app-bundle/TestApp/Images.xcassets/AppIcon.appiconset/Contents.json +58 -0
- data/ext/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/Contents.json +23 -0
- data/ext/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain.png +0 -0
- data/ext/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@2x.png +0 -0
- data/ext/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@3x.png +0 -0
- data/ext/gyp/test/ios/app-bundle/TestApp/TestApp-Info.plist +28 -0
- data/ext/gyp/test/ios/app-bundle/TestApp/check_no_signature.py +13 -0
- data/ext/gyp/test/ios/app-bundle/TestApp/main.m +13 -0
- data/ext/gyp/test/ios/app-bundle/TestApp/only-compile-in-32-bits.m +7 -0
- data/ext/gyp/test/ios/app-bundle/TestApp/only-compile-in-64-bits.m +7 -0
- data/ext/gyp/test/ios/app-bundle/test-archs.gyp +109 -0
- data/ext/gyp/test/ios/app-bundle/test-assets-catalog.gyp +45 -0
- data/ext/gyp/test/ios/app-bundle/test-crosscompile.gyp +47 -0
- data/ext/gyp/test/ios/app-bundle/test-device.gyp +109 -0
- data/ext/gyp/test/ios/app-bundle/test.gyp +75 -0
- data/ext/gyp/test/ios/app-bundle/tool_main.cc +7 -0
- data/ext/gyp/test/ios/copies-with-xcode-envvars/Info.plist +24 -0
- data/ext/gyp/test/ios/copies-with-xcode-envvars/copies-with-xcode-envvars.gyp +97 -0
- data/ext/gyp/test/ios/copies-with-xcode-envvars/empty.c +1 -0
- data/ext/gyp/test/ios/copies-with-xcode-envvars/file0 +1 -0
- data/ext/gyp/test/ios/copies-with-xcode-envvars/file1 +1 -0
- data/ext/gyp/test/ios/copies-with-xcode-envvars/file10 +1 -0
- data/ext/gyp/test/ios/copies-with-xcode-envvars/file11 +1 -0
- data/ext/gyp/test/ios/copies-with-xcode-envvars/file2 +1 -0
- data/ext/gyp/test/ios/copies-with-xcode-envvars/file3 +1 -0
- data/ext/gyp/test/ios/copies-with-xcode-envvars/file4 +1 -0
- data/ext/gyp/test/ios/copies-with-xcode-envvars/file5 +1 -0
- data/ext/gyp/test/ios/copies-with-xcode-envvars/file6 +1 -0
- data/ext/gyp/test/ios/copies-with-xcode-envvars/file7 +1 -0
- data/ext/gyp/test/ios/copies-with-xcode-envvars/file8 +1 -0
- data/ext/gyp/test/ios/copies-with-xcode-envvars/file9 +1 -0
- data/ext/gyp/test/ios/deployment-target/check-version-min.c +33 -0
- data/ext/gyp/test/ios/deployment-target/deployment-target.gyp +34 -0
- data/ext/gyp/test/ios/extension/ActionExtension/ActionViewController.h +9 -0
- data/ext/gyp/test/ios/extension/ActionExtension/ActionViewController.m +31 -0
- data/ext/gyp/test/ios/extension/ActionExtension/Info.plist +42 -0
- data/ext/gyp/test/ios/extension/ActionExtension/MainInterface.storyboard +63 -0
- data/ext/gyp/test/ios/extension/ExtensionContainer/AppDelegate.h +12 -0
- data/ext/gyp/test/ios/extension/ExtensionContainer/AppDelegate.m +19 -0
- data/ext/gyp/test/ios/extension/ExtensionContainer/Base.lproj/Main.storyboard +25 -0
- data/ext/gyp/test/ios/extension/ExtensionContainer/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- data/ext/gyp/test/ios/extension/ExtensionContainer/Images.xcassets/LaunchImage.launchimage/Contents.json +51 -0
- data/ext/gyp/test/ios/extension/ExtensionContainer/Info.plist +32 -0
- data/ext/gyp/test/ios/extension/ExtensionContainer/ViewController.h +11 -0
- data/ext/gyp/test/ios/extension/ExtensionContainer/ViewController.m +24 -0
- data/ext/gyp/test/ios/extension/ExtensionContainer/main.m +13 -0
- data/ext/gyp/test/ios/extension/extension.gyp +91 -0
- data/ext/gyp/test/ios/framework/framework.gyp +43 -0
- data/ext/gyp/test/ios/framework/iOSFramework/Info.plist +26 -0
- data/ext/gyp/test/ios/framework/iOSFramework/Thing.h +10 -0
- data/ext/gyp/test/ios/framework/iOSFramework/Thing.m +22 -0
- data/ext/gyp/test/ios/framework/iOSFramework/iOSFramework.h +9 -0
- data/ext/gyp/test/ios/gyptest-app-ios-assets-catalog.py +57 -0
- data/ext/gyp/test/ios/gyptest-app-ios.py +76 -0
- data/ext/gyp/test/ios/gyptest-archs.py +62 -0
- data/ext/gyp/test/ios/gyptest-copies-with-xcode-envvars.py +65 -0
- data/ext/gyp/test/ios/gyptest-crosscompile.py +34 -0
- data/ext/gyp/test/ios/gyptest-deployment-target.py +23 -0
- data/ext/gyp/test/ios/gyptest-extension.py +51 -0
- data/ext/gyp/test/ios/gyptest-framework.py +37 -0
- data/ext/gyp/test/ios/gyptest-per-config-settings.py +190 -0
- data/ext/gyp/test/ios/gyptest-watch.py +44 -0
- data/ext/gyp/test/ios/gyptest-xcode-ninja.py +25 -0
- data/ext/gyp/test/ios/watch/WatchApp/Images.xcassets/AppIcon.appiconset/Contents.json +62 -0
- data/ext/gyp/test/ios/watch/WatchApp/Images.xcassets/LaunchImage.launchimage/Contents.json +24 -0
- data/ext/gyp/test/ios/watch/WatchApp/Info.plist +35 -0
- data/ext/gyp/test/ios/watch/WatchApp/Interface.storyboard +15 -0
- data/ext/gyp/test/ios/watch/WatchContainer/AppDelegate.h +12 -0
- data/ext/gyp/test/ios/watch/WatchContainer/AppDelegate.m +19 -0
- data/ext/gyp/test/ios/watch/WatchContainer/Base.lproj/Main.storyboard +25 -0
- data/ext/gyp/test/ios/watch/WatchContainer/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- data/ext/gyp/test/ios/watch/WatchContainer/Images.xcassets/LaunchImage.launchimage/Contents.json +51 -0
- data/ext/gyp/test/ios/watch/WatchContainer/Info.plist +32 -0
- data/ext/gyp/test/ios/watch/WatchContainer/ViewController.h +11 -0
- data/ext/gyp/test/ios/watch/WatchContainer/ViewController.m +24 -0
- data/ext/gyp/test/ios/watch/WatchContainer/main.m +13 -0
- data/ext/gyp/test/ios/watch/WatchKitExtension/Images.xcassets/MyImage.imageset/Contents.json +20 -0
- data/ext/gyp/test/ios/watch/WatchKitExtension/Info.plist +38 -0
- data/ext/gyp/test/ios/watch/WatchKitExtension/InterfaceController.h +10 -0
- data/ext/gyp/test/ios/watch/WatchKitExtension/InterfaceController.m +25 -0
- data/ext/gyp/test/ios/watch/WatchKitExtension/MainInterface.storyboard +63 -0
- data/ext/gyp/test/ios/watch/watch.gyp +105 -0
- data/ext/gyp/test/ios/xctests/App/AppDelegate.h +11 -0
- data/ext/gyp/test/ios/xctests/App/AppDelegate.m +18 -0
- data/ext/gyp/test/ios/xctests/App/Base.lproj/LaunchScreen.xib +41 -0
- data/ext/gyp/test/ios/xctests/App/Base.lproj/Main.storyboard +25 -0
- data/ext/gyp/test/ios/xctests/App/Images.xcassets/AppIcon.appiconset/Contents.json +68 -0
- data/ext/gyp/test/ios/xctests/App/Info.plist +47 -0
- data/ext/gyp/test/ios/xctests/App/ViewController.h +9 -0
- data/ext/gyp/test/ios/xctests/App/ViewController.m +21 -0
- data/ext/gyp/test/ios/xctests/App/main.m +13 -0
- data/ext/gyp/test/ios/xctests/AppTests/AppTests.m +31 -0
- data/ext/gyp/test/ios/xctests/AppTests/Info.plist +24 -0
- data/ext/gyp/test/ios/xctests/gyptest-xctests.py +49 -0
- data/ext/gyp/test/ios/xctests/xctests.gyp +74 -0
- data/ext/gyp/test/lib/README.txt +17 -0
- data/ext/gyp/test/lib/TestCmd.py +1597 -0
- data/ext/gyp/test/lib/TestCommon.py +591 -0
- data/ext/gyp/test/lib/TestGyp.py +1259 -0
- data/ext/gyp/test/lib/TestMac.py +76 -0
- data/ext/gyp/test/lib/TestWin.py +101 -0
- data/ext/gyp/test/library/gyptest-shared-obj-install-path.py +39 -0
- data/ext/gyp/test/library/gyptest-shared.py +84 -0
- data/ext/gyp/test/library/gyptest-static.py +84 -0
- data/ext/gyp/test/library/src/lib1.c +10 -0
- data/ext/gyp/test/library/src/lib1_moveable.c +10 -0
- data/ext/gyp/test/library/src/lib2.c +10 -0
- data/ext/gyp/test/library/src/lib2_moveable.c +10 -0
- data/ext/gyp/test/library/src/library.gyp +58 -0
- data/ext/gyp/test/library/src/program.c +15 -0
- data/ext/gyp/test/library/src/shared_dependency.gyp +33 -0
- data/ext/gyp/test/library_dirs/gyptest-library-dirs.py +50 -0
- data/ext/gyp/test/library_dirs/subdir/README.txt +1 -0
- data/ext/gyp/test/library_dirs/subdir/hello.cc +11 -0
- data/ext/gyp/test/library_dirs/subdir/mylib.cc +9 -0
- data/ext/gyp/test/library_dirs/subdir/mylib.h +12 -0
- data/ext/gyp/test/library_dirs/subdir/test-win.gyp +60 -0
- data/ext/gyp/test/library_dirs/subdir/test.gyp +68 -0
- data/ext/gyp/test/link-dependency/gyptest-link-dependency.py +23 -0
- data/ext/gyp/test/link-dependency/main.c +7 -0
- data/ext/gyp/test/link-dependency/mymalloc.c +12 -0
- data/ext/gyp/test/link-dependency/test.gyp +37 -0
- data/ext/gyp/test/link-objects/base.c +6 -0
- data/ext/gyp/test/link-objects/extra.c +5 -0
- data/ext/gyp/test/link-objects/gyptest-all.py +28 -0
- data/ext/gyp/test/link-objects/link-objects.gyp +24 -0
- data/ext/gyp/test/linux/gyptest-implicit-rpath.py +48 -0
- data/ext/gyp/test/linux/gyptest-ldflags-duplicates.py +22 -0
- data/ext/gyp/test/linux/gyptest-ldflags-from-environment.py +45 -0
- data/ext/gyp/test/linux/gyptest-target-rpath.py +43 -0
- data/ext/gyp/test/linux/implicit-rpath/file.c +1 -0
- data/ext/gyp/test/linux/implicit-rpath/main.c +1 -0
- data/ext/gyp/test/linux/implicit-rpath/test.gyp +47 -0
- data/ext/gyp/test/linux/ldflags-duplicates/check-ldflags.py +28 -0
- data/ext/gyp/test/linux/ldflags-duplicates/lib1.c +6 -0
- data/ext/gyp/test/linux/ldflags-duplicates/lib2.c +6 -0
- data/ext/gyp/test/linux/ldflags-duplicates/main.c +7 -0
- data/ext/gyp/test/linux/ldflags-duplicates/test.gyp +45 -0
- data/ext/gyp/test/linux/ldflags-from-environment/main.c +7 -0
- data/ext/gyp/test/linux/ldflags-from-environment/test.gyp +23 -0
- data/ext/gyp/test/linux/target-rpath/file.c +1 -0
- data/ext/gyp/test/linux/target-rpath/main.c +1 -0
- data/ext/gyp/test/linux/target-rpath/test.gyp +47 -0
- data/ext/gyp/test/mac/action-envvars/action/action.gyp +34 -0
- data/ext/gyp/test/mac/action-envvars/action/action.sh +8 -0
- data/ext/gyp/test/mac/app-bundle/TestApp/English.lproj/InfoPlist-error.strings +3 -0
- data/ext/gyp/test/mac/app-bundle/TestApp/English.lproj/InfoPlist.strings +3 -0
- data/ext/gyp/test/mac/app-bundle/TestApp/English.lproj/MainMenu.xib +4119 -0
- data/ext/gyp/test/mac/app-bundle/TestApp/English.lproj/utf-16be.strings +0 -0
- data/ext/gyp/test/mac/app-bundle/TestApp/English.lproj/utf-16le.strings +0 -0
- data/ext/gyp/test/mac/app-bundle/TestApp/Images.xcassets/AppIcon.appiconset/Contents.json +58 -0
- data/ext/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/Contents.json +23 -0
- data/ext/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain.png +0 -0
- data/ext/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@2x.png +0 -0
- data/ext/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@3x.png +0 -0
- data/ext/gyp/test/mac/app-bundle/TestApp/TestApp-Info.plist +34 -0
- data/ext/gyp/test/mac/app-bundle/TestApp/TestAppAppDelegate.h +13 -0
- data/ext/gyp/test/mac/app-bundle/TestApp/TestAppAppDelegate.m +15 -0
- data/ext/gyp/test/mac/app-bundle/TestApp/main.m +10 -0
- data/ext/gyp/test/mac/app-bundle/empty.c +0 -0
- data/ext/gyp/test/mac/app-bundle/test-assets-catalog.gyp +43 -0
- data/ext/gyp/test/mac/app-bundle/test-error.gyp +31 -0
- data/ext/gyp/test/mac/app-bundle/test.gyp +41 -0
- data/ext/gyp/test/mac/archs/empty_main.cc +1 -0
- data/ext/gyp/test/mac/archs/file.mm +1 -0
- data/ext/gyp/test/mac/archs/file_a.cc +8 -0
- data/ext/gyp/test/mac/archs/file_a.h +10 -0
- data/ext/gyp/test/mac/archs/file_b.cc +8 -0
- data/ext/gyp/test/mac/archs/file_b.h +10 -0
- data/ext/gyp/test/mac/archs/file_c.cc +11 -0
- data/ext/gyp/test/mac/archs/file_d.cc +11 -0
- data/ext/gyp/test/mac/archs/header.h +1 -0
- data/ext/gyp/test/mac/archs/my_file.cc +4 -0
- data/ext/gyp/test/mac/archs/my_main_file.cc +9 -0
- data/ext/gyp/test/mac/archs/test-archs-multiarch.gyp +92 -0
- data/ext/gyp/test/mac/archs/test-archs-x86_64.gyp +27 -0
- data/ext/gyp/test/mac/archs/test-dependencies.gyp +92 -0
- data/ext/gyp/test/mac/archs/test-no-archs.gyp +21 -0
- data/ext/gyp/test/mac/archs/test-valid-archs.gyp +28 -0
- data/ext/gyp/test/mac/bundle-resources/change.sh +3 -0
- data/ext/gyp/test/mac/bundle-resources/executable-file.sh +3 -0
- data/ext/gyp/test/mac/bundle-resources/secret.txt +1 -0
- data/ext/gyp/test/mac/bundle-resources/test.gyp +59 -0
- data/ext/gyp/test/mac/cflags/ccfile.cc +7 -0
- data/ext/gyp/test/mac/cflags/ccfile_withcflags.cc +7 -0
- data/ext/gyp/test/mac/cflags/cfile.c +7 -0
- data/ext/gyp/test/mac/cflags/cppfile.cpp +7 -0
- data/ext/gyp/test/mac/cflags/cppfile_withcflags.cpp +7 -0
- data/ext/gyp/test/mac/cflags/cxxfile.cxx +7 -0
- data/ext/gyp/test/mac/cflags/cxxfile_withcflags.cxx +7 -0
- data/ext/gyp/test/mac/cflags/mfile.m +7 -0
- data/ext/gyp/test/mac/cflags/mmfile.mm +7 -0
- data/ext/gyp/test/mac/cflags/mmfile_withcflags.mm +7 -0
- data/ext/gyp/test/mac/cflags/test.gyp +132 -0
- data/ext/gyp/test/mac/clang-cxx-language-standard/c++11.cc +8 -0
- data/ext/gyp/test/mac/clang-cxx-language-standard/c++98.cc +24 -0
- data/ext/gyp/test/mac/clang-cxx-language-standard/clang-cxx-language-standard.gyp +30 -0
- data/ext/gyp/test/mac/clang-cxx-library/clang-cxx-library.gyp +32 -0
- data/ext/gyp/test/mac/clang-cxx-library/libc++.cc +11 -0
- data/ext/gyp/test/mac/clang-cxx-library/libstdc++.cc +11 -0
- data/ext/gyp/test/mac/copies-with-xcode-envvars/copies-with-xcode-envvars.gyp +87 -0
- data/ext/gyp/test/mac/copies-with-xcode-envvars/empty.c +1 -0
- data/ext/gyp/test/mac/copies-with-xcode-envvars/file0 +1 -0
- data/ext/gyp/test/mac/copies-with-xcode-envvars/file1 +1 -0
- data/ext/gyp/test/mac/copies-with-xcode-envvars/file10 +1 -0
- data/ext/gyp/test/mac/copies-with-xcode-envvars/file11 +1 -0
- data/ext/gyp/test/mac/copies-with-xcode-envvars/file2 +1 -0
- data/ext/gyp/test/mac/copies-with-xcode-envvars/file3 +1 -0
- data/ext/gyp/test/mac/copies-with-xcode-envvars/file4 +1 -0
- data/ext/gyp/test/mac/copies-with-xcode-envvars/file5 +1 -0
- data/ext/gyp/test/mac/copies-with-xcode-envvars/file6 +1 -0
- data/ext/gyp/test/mac/copies-with-xcode-envvars/file7 +1 -0
- data/ext/gyp/test/mac/copies-with-xcode-envvars/file8 +1 -0
- data/ext/gyp/test/mac/copies-with-xcode-envvars/file9 +1 -0
- data/ext/gyp/test/mac/copy-dylib/empty.c +1 -0
- data/ext/gyp/test/mac/copy-dylib/test.gyp +31 -0
- data/ext/gyp/test/mac/debuginfo/file.c +6 -0
- data/ext/gyp/test/mac/debuginfo/test.gyp +82 -0
- data/ext/gyp/test/mac/depend-on-bundle/English.lproj/InfoPlist.strings +1 -0
- data/ext/gyp/test/mac/depend-on-bundle/Info.plist +28 -0
- data/ext/gyp/test/mac/depend-on-bundle/bundle.c +1 -0
- data/ext/gyp/test/mac/depend-on-bundle/executable.c +4 -0
- data/ext/gyp/test/mac/depend-on-bundle/test.gyp +28 -0
- data/ext/gyp/test/mac/deployment-target/check-version-min.c +33 -0
- data/ext/gyp/test/mac/deployment-target/deployment-target.gyp +28 -0
- data/ext/gyp/test/mac/framework/TestFramework/English.lproj/InfoPlist.strings +2 -0
- data/ext/gyp/test/mac/framework/TestFramework/Info.plist +28 -0
- data/ext/gyp/test/mac/framework/TestFramework/ObjCVector.h +28 -0
- data/ext/gyp/test/mac/framework/TestFramework/ObjCVector.mm +63 -0
- data/ext/gyp/test/mac/framework/TestFramework/ObjCVectorInternal.h +9 -0
- data/ext/gyp/test/mac/framework/TestFramework/TestFramework_Prefix.pch +7 -0
- data/ext/gyp/test/mac/framework/empty.c +0 -0
- data/ext/gyp/test/mac/framework/framework.gyp +108 -0
- data/ext/gyp/test/mac/framework-dirs/calculate.c +15 -0
- data/ext/gyp/test/mac/framework-dirs/framework-dirs.gyp +21 -0
- data/ext/gyp/test/mac/framework-headers/myframework.h +8 -0
- data/ext/gyp/test/mac/framework-headers/myframework.m +8 -0
- data/ext/gyp/test/mac/framework-headers/test.gyp +44 -0
- data/ext/gyp/test/mac/global-settings/src/dir1/dir1.gyp +11 -0
- data/ext/gyp/test/mac/global-settings/src/dir2/dir2.gyp +22 -0
- data/ext/gyp/test/mac/global-settings/src/dir2/file.txt +1 -0
- data/ext/gyp/test/mac/gyptest-action-envvars.py +36 -0
- data/ext/gyp/test/mac/gyptest-app-assets-catalog.py +125 -0
- data/ext/gyp/test/mac/gyptest-app-error.py +49 -0
- data/ext/gyp/test/mac/gyptest-app.py +122 -0
- data/ext/gyp/test/mac/gyptest-archs.py +96 -0
- data/ext/gyp/test/mac/gyptest-bundle-resources.py +64 -0
- data/ext/gyp/test/mac/gyptest-cflags.py +21 -0
- data/ext/gyp/test/mac/gyptest-clang-cxx-language-standard.py +25 -0
- data/ext/gyp/test/mac/gyptest-clang-cxx-library.py +32 -0
- data/ext/gyp/test/mac/gyptest-copies-with-xcode-envvars.py +65 -0
- data/ext/gyp/test/mac/gyptest-copies.py +62 -0
- data/ext/gyp/test/mac/gyptest-copy-dylib.py +25 -0
- data/ext/gyp/test/mac/gyptest-debuginfo.py +36 -0
- data/ext/gyp/test/mac/gyptest-depend-on-bundle.py +45 -0
- data/ext/gyp/test/mac/gyptest-deployment-target.py +27 -0
- data/ext/gyp/test/mac/gyptest-framework-dirs.py +23 -0
- data/ext/gyp/test/mac/gyptest-framework-headers.py +38 -0
- data/ext/gyp/test/mac/gyptest-framework.py +80 -0
- data/ext/gyp/test/mac/gyptest-global-settings.py +33 -0
- data/ext/gyp/test/mac/gyptest-identical-name.py +45 -0
- data/ext/gyp/test/mac/gyptest-infoplist-process.py +56 -0
- data/ext/gyp/test/mac/gyptest-installname.py +85 -0
- data/ext/gyp/test/mac/gyptest-kext.py +27 -0
- data/ext/gyp/test/mac/gyptest-ldflags-passed-to-libtool.py +37 -0
- data/ext/gyp/test/mac/gyptest-ldflags.py +74 -0
- data/ext/gyp/test/mac/gyptest-libraries.py +30 -0
- data/ext/gyp/test/mac/gyptest-libtool-zero.py +26 -0
- data/ext/gyp/test/mac/gyptest-loadable-module-bundle-product-extension.py +31 -0
- data/ext/gyp/test/mac/gyptest-loadable-module.py +54 -0
- data/ext/gyp/test/mac/gyptest-lto.py +66 -0
- data/ext/gyp/test/mac/gyptest-missing-cfbundlesignature.py +34 -0
- data/ext/gyp/test/mac/gyptest-non-strs-flattened-to-env.py +38 -0
- data/ext/gyp/test/mac/gyptest-objc-arc.py +27 -0
- data/ext/gyp/test/mac/gyptest-objc-gc.py +51 -0
- data/ext/gyp/test/mac/gyptest-postbuild-copy-bundle.py +75 -0
- data/ext/gyp/test/mac/gyptest-postbuild-defaults.py +34 -0
- data/ext/gyp/test/mac/gyptest-postbuild-fail.py +71 -0
- data/ext/gyp/test/mac/gyptest-postbuild-multiple-configurations.py +26 -0
- data/ext/gyp/test/mac/gyptest-postbuild-static-library.py +28 -0
- data/ext/gyp/test/mac/gyptest-postbuild.py +53 -0
- data/ext/gyp/test/mac/gyptest-prefixheader.py +20 -0
- data/ext/gyp/test/mac/gyptest-rebuild.py +46 -0
- data/ext/gyp/test/mac/gyptest-rpath.py +50 -0
- data/ext/gyp/test/mac/gyptest-sdkroot.py +56 -0
- data/ext/gyp/test/mac/gyptest-sourceless-module.py +77 -0
- data/ext/gyp/test/mac/gyptest-strip-default.py +97 -0
- data/ext/gyp/test/mac/gyptest-strip.py +66 -0
- data/ext/gyp/test/mac/gyptest-swift-library.py +67 -0
- data/ext/gyp/test/mac/gyptest-type-envvars.py +26 -0
- data/ext/gyp/test/mac/gyptest-unicode-settings.py +20 -0
- data/ext/gyp/test/mac/gyptest-xcode-env-order.py +95 -0
- data/ext/gyp/test/mac/gyptest-xcode-gcc-clang.py +40 -0
- data/ext/gyp/test/mac/gyptest-xcode-gcc.py +60 -0
- data/ext/gyp/test/mac/gyptest-xcode-support-actions.py +25 -0
- data/ext/gyp/test/mac/gyptest-xctest.py +41 -0
- data/ext/gyp/test/mac/gyptest-xcuitest.py +39 -0
- data/ext/gyp/test/mac/identical-name/proxy/proxy.cc +2 -0
- data/ext/gyp/test/mac/identical-name/proxy/proxy.gyp +9 -0
- data/ext/gyp/test/mac/identical-name/proxy/testlib/testlib.cc +2 -0
- data/ext/gyp/test/mac/identical-name/proxy/testlib/testlib.gyp +8 -0
- data/ext/gyp/test/mac/identical-name/test-should-fail.gyp +10 -0
- data/ext/gyp/test/mac/identical-name/test.gyp +11 -0
- data/ext/gyp/test/mac/identical-name/test.gypi +7 -0
- data/ext/gyp/test/mac/identical-name/testlib/main.cc +3 -0
- data/ext/gyp/test/mac/identical-name/testlib/testlib.gyp +14 -0
- data/ext/gyp/test/mac/identical-name/testlib/void.cc +2 -0
- data/ext/gyp/test/mac/infoplist-process/Info.plist +36 -0
- data/ext/gyp/test/mac/infoplist-process/main.c +7 -0
- data/ext/gyp/test/mac/infoplist-process/test1.gyp +25 -0
- data/ext/gyp/test/mac/infoplist-process/test2.gyp +25 -0
- data/ext/gyp/test/mac/infoplist-process/test3.gyp +25 -0
- data/ext/gyp/test/mac/installname/Info.plist +28 -0
- data/ext/gyp/test/mac/installname/file.c +1 -0
- data/ext/gyp/test/mac/installname/main.c +1 -0
- data/ext/gyp/test/mac/installname/test.gyp +93 -0
- data/ext/gyp/test/mac/kext/GypKext/GypKext-Info.plist +35 -0
- data/ext/gyp/test/mac/kext/GypKext/GypKext.c +16 -0
- data/ext/gyp/test/mac/kext/kext.gyp +18 -0
- data/ext/gyp/test/mac/ldflags/subdirectory/Info.plist +8 -0
- data/ext/gyp/test/mac/ldflags/subdirectory/file.c +2 -0
- data/ext/gyp/test/mac/ldflags/subdirectory/symbol_list.def +1 -0
- data/ext/gyp/test/mac/ldflags/subdirectory/test.gyp +66 -0
- data/ext/gyp/test/mac/ldflags-libtool/file.c +1 -0
- data/ext/gyp/test/mac/ldflags-libtool/test.gyp +17 -0
- data/ext/gyp/test/mac/libraries/subdir/README.txt +1 -0
- data/ext/gyp/test/mac/libraries/subdir/hello.cc +10 -0
- data/ext/gyp/test/mac/libraries/subdir/mylib.c +7 -0
- data/ext/gyp/test/mac/libraries/subdir/test.gyp +65 -0
- data/ext/gyp/test/mac/libtool-zero/mylib.c +7 -0
- data/ext/gyp/test/mac/libtool-zero/test.gyp +18 -0
- data/ext/gyp/test/mac/loadable-module/Info.plist +26 -0
- data/ext/gyp/test/mac/loadable-module/module.c +11 -0
- data/ext/gyp/test/mac/loadable-module/test.gyp +18 -0
- data/ext/gyp/test/mac/loadable-module-bundle-product-extension/src.cc +7 -0
- data/ext/gyp/test/mac/loadable-module-bundle-product-extension/test.gyp +24 -0
- data/ext/gyp/test/mac/lto/asmfile.S +2 -0
- data/ext/gyp/test/mac/lto/ccfile.cc +1 -0
- data/ext/gyp/test/mac/lto/cfile.c +1 -0
- data/ext/gyp/test/mac/lto/mfile.m +1 -0
- data/ext/gyp/test/mac/lto/mmfile.mm +1 -0
- data/ext/gyp/test/mac/lto/test.gyp +35 -0
- data/ext/gyp/test/mac/missing-cfbundlesignature/Info.plist +10 -0
- data/ext/gyp/test/mac/missing-cfbundlesignature/Other-Info.plist +12 -0
- data/ext/gyp/test/mac/missing-cfbundlesignature/Third-Info.plist +12 -0
- data/ext/gyp/test/mac/missing-cfbundlesignature/file.c +1 -0
- data/ext/gyp/test/mac/missing-cfbundlesignature/test.gyp +34 -0
- data/ext/gyp/test/mac/non-strs-flattened-to-env/Info.plist +15 -0
- data/ext/gyp/test/mac/non-strs-flattened-to-env/main.c +7 -0
- data/ext/gyp/test/mac/non-strs-flattened-to-env/test.gyp +27 -0
- data/ext/gyp/test/mac/objc-arc/c-file.c +5 -0
- data/ext/gyp/test/mac/objc-arc/cc-file.cc +5 -0
- data/ext/gyp/test/mac/objc-arc/m-file-arc-weak.m +9 -0
- data/ext/gyp/test/mac/objc-arc/m-file-no-arc.m +9 -0
- data/ext/gyp/test/mac/objc-arc/m-file.m +9 -0
- data/ext/gyp/test/mac/objc-arc/mm-file-arc-weak.mm +9 -0
- data/ext/gyp/test/mac/objc-arc/mm-file-no-arc.mm +9 -0
- data/ext/gyp/test/mac/objc-arc/mm-file.mm +9 -0
- data/ext/gyp/test/mac/objc-arc/test.gyp +53 -0
- data/ext/gyp/test/mac/objc-gc/c-file.c +1 -0
- data/ext/gyp/test/mac/objc-gc/cc-file.cc +1 -0
- data/ext/gyp/test/mac/objc-gc/main.m +6 -0
- data/ext/gyp/test/mac/objc-gc/needs-gc-mm.mm +1 -0
- data/ext/gyp/test/mac/objc-gc/needs-gc.m +1 -0
- data/ext/gyp/test/mac/objc-gc/test.gyp +102 -0
- data/ext/gyp/test/mac/postbuild-copy-bundle/Framework-Info.plist +30 -0
- data/ext/gyp/test/mac/postbuild-copy-bundle/TestApp-Info.plist +32 -0
- data/ext/gyp/test/mac/postbuild-copy-bundle/copied.txt +1 -0
- data/ext/gyp/test/mac/postbuild-copy-bundle/empty.c +0 -0
- data/ext/gyp/test/mac/postbuild-copy-bundle/main.c +4 -0
- data/ext/gyp/test/mac/postbuild-copy-bundle/postbuild-copy-framework.sh +9 -0
- data/ext/gyp/test/mac/postbuild-copy-bundle/resource_file.sb +1 -0
- data/ext/gyp/test/mac/postbuild-copy-bundle/test.gyp +49 -0
- data/ext/gyp/test/mac/postbuild-defaults/Info.plist +13 -0
- data/ext/gyp/test/mac/postbuild-defaults/main.c +7 -0
- data/ext/gyp/test/mac/postbuild-defaults/postbuild-defaults.sh +15 -0
- data/ext/gyp/test/mac/postbuild-defaults/test.gyp +26 -0
- data/ext/gyp/test/mac/postbuild-fail/file.c +6 -0
- data/ext/gyp/test/mac/postbuild-fail/postbuild-fail.sh +6 -0
- data/ext/gyp/test/mac/postbuild-fail/test.gyp +38 -0
- data/ext/gyp/test/mac/postbuild-fail/touch-dynamic.sh +7 -0
- data/ext/gyp/test/mac/postbuild-fail/touch-static.sh +7 -0
- data/ext/gyp/test/mac/postbuild-multiple-configurations/main.c +4 -0
- data/ext/gyp/test/mac/postbuild-multiple-configurations/postbuild-touch-file.sh +7 -0
- data/ext/gyp/test/mac/postbuild-multiple-configurations/test.gyp +26 -0
- data/ext/gyp/test/mac/postbuild-static-library/empty.c +4 -0
- data/ext/gyp/test/mac/postbuild-static-library/postbuild-touch-file.sh +7 -0
- data/ext/gyp/test/mac/postbuild-static-library/test.gyp +34 -0
- data/ext/gyp/test/mac/postbuilds/copy.sh +3 -0
- data/ext/gyp/test/mac/postbuilds/file.c +4 -0
- data/ext/gyp/test/mac/postbuilds/file_g.c +4 -0
- data/ext/gyp/test/mac/postbuilds/file_h.c +4 -0
- data/ext/gyp/test/mac/postbuilds/script/shared_library_postbuild.sh +23 -0
- data/ext/gyp/test/mac/postbuilds/script/static_library_postbuild.sh +23 -0
- data/ext/gyp/test/mac/postbuilds/subdirectory/copied_file.txt +1 -0
- data/ext/gyp/test/mac/postbuilds/subdirectory/nested_target.gyp +53 -0
- data/ext/gyp/test/mac/postbuilds/test.gyp +93 -0
- data/ext/gyp/test/mac/prefixheader/file.c +1 -0
- data/ext/gyp/test/mac/prefixheader/file.cc +1 -0
- data/ext/gyp/test/mac/prefixheader/file.m +1 -0
- data/ext/gyp/test/mac/prefixheader/file.mm +1 -0
- data/ext/gyp/test/mac/prefixheader/header.h +1 -0
- data/ext/gyp/test/mac/prefixheader/test.gyp +82 -0
- data/ext/gyp/test/mac/rebuild/TestApp-Info.plist +32 -0
- data/ext/gyp/test/mac/rebuild/delay-touch.sh +6 -0
- data/ext/gyp/test/mac/rebuild/empty.c +0 -0
- data/ext/gyp/test/mac/rebuild/main.c +1 -0
- data/ext/gyp/test/mac/rebuild/test.gyp +56 -0
- data/ext/gyp/test/mac/rpath/file.c +1 -0
- data/ext/gyp/test/mac/rpath/main.c +1 -0
- data/ext/gyp/test/mac/rpath/test.gyp +48 -0
- data/ext/gyp/test/mac/sdkroot/file.cc +5 -0
- data/ext/gyp/test/mac/sdkroot/test.gyp +35 -0
- data/ext/gyp/test/mac/sdkroot/test_shorthand.sh +20 -0
- data/ext/gyp/test/mac/sourceless-module/empty.c +1 -0
- data/ext/gyp/test/mac/sourceless-module/empty.txt +2 -0
- data/ext/gyp/test/mac/sourceless-module/fun.c +1 -0
- data/ext/gyp/test/mac/sourceless-module/test.gyp +96 -0
- data/ext/gyp/test/mac/strip/file.c +22 -0
- data/ext/gyp/test/mac/strip/main.c +25 -0
- data/ext/gyp/test/mac/strip/strip.saves +5 -0
- data/ext/gyp/test/mac/strip/subdirectory/nested_file.c +1 -0
- data/ext/gyp/test/mac/strip/subdirectory/nested_strip.saves +5 -0
- data/ext/gyp/test/mac/strip/subdirectory/subdirectory.gyp +38 -0
- data/ext/gyp/test/mac/strip/subdirectory/test_reading_save_file_from_postbuild.sh +5 -0
- data/ext/gyp/test/mac/strip/test-defaults.gyp +51 -0
- data/ext/gyp/test/mac/strip/test.gyp +119 -0
- data/ext/gyp/test/mac/swift-library/Info.plist +28 -0
- data/ext/gyp/test/mac/swift-library/file.swift +9 -0
- data/ext/gyp/test/mac/swift-library/test.gyp +21 -0
- data/ext/gyp/test/mac/type_envvars/file.c +6 -0
- data/ext/gyp/test/mac/type_envvars/test.gyp +100 -0
- data/ext/gyp/test/mac/type_envvars/test_bundle_executable.sh +30 -0
- data/ext/gyp/test/mac/type_envvars/test_bundle_loadable_module.sh +35 -0
- data/ext/gyp/test/mac/type_envvars/test_bundle_shared_library.sh +38 -0
- data/ext/gyp/test/mac/type_envvars/test_check_sdkroot.sh +47 -0
- data/ext/gyp/test/mac/type_envvars/test_nonbundle_executable.sh +33 -0
- data/ext/gyp/test/mac/type_envvars/test_nonbundle_loadable_module.sh +31 -0
- data/ext/gyp/test/mac/type_envvars/test_nonbundle_none.sh +32 -0
- data/ext/gyp/test/mac/type_envvars/test_nonbundle_shared_library.sh +31 -0
- data/ext/gyp/test/mac/type_envvars/test_nonbundle_static_library.sh +31 -0
- data/ext/gyp/test/mac/unicode-settings/file.cc +2 -0
- data/ext/gyp/test/mac/unicode-settings/test.gyp +23 -0
- data/ext/gyp/test/mac/unicode-settings/test_bundle_display_name.sh +7 -0
- data/ext/gyp/test/mac/xcode-env-order/Info.plist +56 -0
- data/ext/gyp/test/mac/xcode-env-order/file.ext1 +0 -0
- data/ext/gyp/test/mac/xcode-env-order/file.ext2 +0 -0
- data/ext/gyp/test/mac/xcode-env-order/file.ext3 +0 -0
- data/ext/gyp/test/mac/xcode-env-order/main.c +7 -0
- data/ext/gyp/test/mac/xcode-env-order/test.gyp +121 -0
- data/ext/gyp/test/mac/xcode-gcc/aliasing.cc +13 -0
- data/ext/gyp/test/mac/xcode-gcc/test-clang.gyp +42 -0
- data/ext/gyp/test/mac/xcode-gcc/test.gyp +60 -0
- data/ext/gyp/test/mac/xcode-gcc/valid_c.c +8 -0
- data/ext/gyp/test/mac/xcode-gcc/valid_cc.cc +8 -0
- data/ext/gyp/test/mac/xcode-gcc/valid_m.m +8 -0
- data/ext/gyp/test/mac/xcode-gcc/valid_mm.mm +8 -0
- data/ext/gyp/test/mac/xcode-gcc/warn_about_invalid_offsetof_macro.cc +15 -0
- data/ext/gyp/test/mac/xcode-gcc/warn_about_missing_newline.c +8 -0
- data/ext/gyp/test/mac/xcode-support-actions/source.c +0 -0
- data/ext/gyp/test/mac/xcode-support-actions/test.gyp +26 -0
- data/ext/gyp/test/mac/xctest/MyClass.h +8 -0
- data/ext/gyp/test/mac/xctest/MyClass.m +8 -0
- data/ext/gyp/test/mac/xctest/TestCase.m +16 -0
- data/ext/gyp/test/mac/xctest/resource.txt +1 -0
- data/ext/gyp/test/mac/xctest/test.gyp +47 -0
- data/ext/gyp/test/mac/xctest/test.xcodeproj/xcshareddata/xcschemes/classes.xcscheme +69 -0
- data/ext/gyp/test/mac/xcuitest/Info.plist +28 -0
- data/ext/gyp/test/mac/xcuitest/MyAppDelegate.h +8 -0
- data/ext/gyp/test/mac/xcuitest/MyAppDelegate.m +19 -0
- data/ext/gyp/test/mac/xcuitest/TestCase.m +15 -0
- data/ext/gyp/test/mac/xcuitest/main.m +15 -0
- data/ext/gyp/test/mac/xcuitest/resource.txt +1 -0
- data/ext/gyp/test/mac/xcuitest/test.gyp +69 -0
- data/ext/gyp/test/make/dependencies.gyp +15 -0
- data/ext/gyp/test/make/gyptest-dependencies.py +26 -0
- data/ext/gyp/test/make/gyptest-noload.py +57 -0
- data/ext/gyp/test/make/main.cc +12 -0
- data/ext/gyp/test/make/main.h +0 -0
- data/ext/gyp/test/make/noload/all.gyp +18 -0
- data/ext/gyp/test/make/noload/lib/shared.c +3 -0
- data/ext/gyp/test/make/noload/lib/shared.gyp +16 -0
- data/ext/gyp/test/make/noload/lib/shared.h +1 -0
- data/ext/gyp/test/make/noload/main.c +9 -0
- data/ext/gyp/test/make_global_settings/ar/gyptest-make_global_settings_ar.py +126 -0
- data/ext/gyp/test/make_global_settings/ar/make_global_settings_ar.gyp +29 -0
- data/ext/gyp/test/make_global_settings/basics/gyptest-make_global_settings.py +51 -0
- data/ext/gyp/test/make_global_settings/basics/make_global_settings.gyp +17 -0
- data/ext/gyp/test/make_global_settings/env-wrapper/gyptest-wrapper.py +51 -0
- data/ext/gyp/test/make_global_settings/env-wrapper/wrapper.gyp +17 -0
- data/ext/gyp/test/make_global_settings/full-toolchain/bar.cc +1 -0
- data/ext/gyp/test/make_global_settings/full-toolchain/foo.c +1 -0
- data/ext/gyp/test/make_global_settings/full-toolchain/gyptest-make_global_settings.py +53 -0
- data/ext/gyp/test/make_global_settings/full-toolchain/make_global_settings.gyp +22 -0
- data/ext/gyp/test/make_global_settings/full-toolchain/my_nm.py +9 -0
- data/ext/gyp/test/make_global_settings/full-toolchain/my_readelf.py +9 -0
- data/ext/gyp/test/make_global_settings/ld/gyptest-make_global_settings_ld.py +130 -0
- data/ext/gyp/test/make_global_settings/ld/make_global_settings_ld.gyp +29 -0
- data/ext/gyp/test/make_global_settings/wrapper/gyptest-wrapper.py +52 -0
- data/ext/gyp/test/make_global_settings/wrapper/wrapper.gyp +21 -0
- data/ext/gyp/test/many-actions/file0 +0 -0
- data/ext/gyp/test/many-actions/file1 +0 -0
- data/ext/gyp/test/many-actions/file2 +0 -0
- data/ext/gyp/test/many-actions/file3 +0 -0
- data/ext/gyp/test/many-actions/file4 +0 -0
- data/ext/gyp/test/many-actions/gyptest-many-actions-unsorted.py +43 -0
- data/ext/gyp/test/many-actions/gyptest-many-actions.py +29 -0
- data/ext/gyp/test/many-actions/many-actions-unsorted.gyp +154 -0
- data/ext/gyp/test/many-actions/many-actions.gyp +1817 -0
- data/ext/gyp/test/module/gyptest-default.py +28 -0
- data/ext/gyp/test/module/src/lib1.c +10 -0
- data/ext/gyp/test/module/src/lib2.c +10 -0
- data/ext/gyp/test/module/src/module.gyp +53 -0
- data/ext/gyp/test/module/src/program.c +111 -0
- data/ext/gyp/test/msvs/buildevents/buildevents.gyp +14 -0
- data/ext/gyp/test/msvs/buildevents/gyptest-msbuild-supports-prepostbuild.py +24 -0
- data/ext/gyp/test/msvs/buildevents/gyptest-ninja-warnings.py +29 -0
- data/ext/gyp/test/msvs/buildevents/main.cc +5 -0
- data/ext/gyp/test/msvs/config_attrs/gyptest-config_attrs.py +41 -0
- data/ext/gyp/test/msvs/config_attrs/hello.c +11 -0
- data/ext/gyp/test/msvs/config_attrs/hello.gyp +21 -0
- data/ext/gyp/test/msvs/express/base/base.gyp +22 -0
- data/ext/gyp/test/msvs/express/express.gyp +19 -0
- data/ext/gyp/test/msvs/express/gyptest-express.py +29 -0
- data/ext/gyp/test/msvs/external_builder/external.gyp +68 -0
- data/ext/gyp/test/msvs/external_builder/external_builder.py +9 -0
- data/ext/gyp/test/msvs/external_builder/gyptest-all.py +59 -0
- data/ext/gyp/test/msvs/external_builder/hello.cpp +10 -0
- data/ext/gyp/test/msvs/external_builder/hello.z +6 -0
- data/ext/gyp/test/msvs/external_builder/msbuild_action.py +9 -0
- data/ext/gyp/test/msvs/external_builder/msbuild_rule.py +11 -0
- data/ext/gyp/test/msvs/filters/filters.gyp +47 -0
- data/ext/gyp/test/msvs/filters/gyptest-filters-2008.py +68 -0
- data/ext/gyp/test/msvs/filters/gyptest-filters-2010.py +57 -0
- data/ext/gyp/test/msvs/list_excluded/gyptest-all.py +51 -0
- data/ext/gyp/test/msvs/list_excluded/hello.cpp +10 -0
- data/ext/gyp/test/msvs/list_excluded/hello_exclude.gyp +19 -0
- data/ext/gyp/test/msvs/list_excluded/hello_mac.cpp +10 -0
- data/ext/gyp/test/msvs/missing_sources/gyptest-missing.py +43 -0
- data/ext/gyp/test/msvs/missing_sources/hello_missing.gyp +15 -0
- data/ext/gyp/test/msvs/multiple_actions_error_handling/action_fail.py +7 -0
- data/ext/gyp/test/msvs/multiple_actions_error_handling/action_succeed.py +7 -0
- data/ext/gyp/test/msvs/multiple_actions_error_handling/actions.gyp +40 -0
- data/ext/gyp/test/msvs/multiple_actions_error_handling/gyptest.py +26 -0
- data/ext/gyp/test/msvs/props/AppName.props +14 -0
- data/ext/gyp/test/msvs/props/AppName.vsprops +11 -0
- data/ext/gyp/test/msvs/props/gyptest-props.py +22 -0
- data/ext/gyp/test/msvs/props/hello.c +11 -0
- data/ext/gyp/test/msvs/props/hello.gyp +22 -0
- data/ext/gyp/test/msvs/rules_stdout_stderr/dummy.bar +5 -0
- data/ext/gyp/test/msvs/rules_stdout_stderr/dummy.foo +5 -0
- data/ext/gyp/test/msvs/rules_stdout_stderr/gyptest-rules-stdout-stderr.py +29 -0
- data/ext/gyp/test/msvs/rules_stdout_stderr/rule_stderr.py +8 -0
- data/ext/gyp/test/msvs/rules_stdout_stderr/rule_stdout.py +7 -0
- data/ext/gyp/test/msvs/rules_stdout_stderr/rules-stdout-stderr.gyp +52 -0
- data/ext/gyp/test/msvs/shared_output/common.gypi +17 -0
- data/ext/gyp/test/msvs/shared_output/gyptest-shared_output.py +41 -0
- data/ext/gyp/test/msvs/shared_output/hello.c +12 -0
- data/ext/gyp/test/msvs/shared_output/hello.gyp +21 -0
- data/ext/gyp/test/msvs/shared_output/there/there.c +12 -0
- data/ext/gyp/test/msvs/shared_output/there/there.gyp +16 -0
- data/ext/gyp/test/msvs/uldi2010/gyptest-all.py +20 -0
- data/ext/gyp/test/msvs/uldi2010/hello.c +13 -0
- data/ext/gyp/test/msvs/uldi2010/hello.gyp +26 -0
- data/ext/gyp/test/msvs/uldi2010/hello2.c +10 -0
- data/ext/gyp/test/multiple-targets/gyptest-all.py +30 -0
- data/ext/gyp/test/multiple-targets/gyptest-default.py +30 -0
- data/ext/gyp/test/multiple-targets/src/common.c +7 -0
- data/ext/gyp/test/multiple-targets/src/multiple.gyp +24 -0
- data/ext/gyp/test/multiple-targets/src/prog1.c +10 -0
- data/ext/gyp/test/multiple-targets/src/prog2.c +10 -0
- data/ext/gyp/test/ninja/action-rule-hash/gyptest-action-rule-hash.py +32 -0
- data/ext/gyp/test/ninja/action-rule-hash/subdir/action-rule-hash.gyp +29 -0
- data/ext/gyp/test/ninja/action-rule-hash/subdir/emit.py +13 -0
- data/ext/gyp/test/ninja/action_dependencies/gyptest-action-dependencies.py +64 -0
- data/ext/gyp/test/ninja/action_dependencies/src/a.c +10 -0
- data/ext/gyp/test/ninja/action_dependencies/src/a.h +13 -0
- data/ext/gyp/test/ninja/action_dependencies/src/action_dependencies.gyp +88 -0
- data/ext/gyp/test/ninja/action_dependencies/src/b.c +18 -0
- data/ext/gyp/test/ninja/action_dependencies/src/b.h +13 -0
- data/ext/gyp/test/ninja/action_dependencies/src/c.c +10 -0
- data/ext/gyp/test/ninja/action_dependencies/src/c.h +13 -0
- data/ext/gyp/test/ninja/action_dependencies/src/emit.py +11 -0
- data/ext/gyp/test/ninja/chained-dependency/chained-dependency.gyp +53 -0
- data/ext/gyp/test/ninja/chained-dependency/chained.c +5 -0
- data/ext/gyp/test/ninja/chained-dependency/gyptest-chained-dependency.py +30 -0
- data/ext/gyp/test/ninja/empty-and-non-empty-duplicate-name/gyptest-empty-and-non-empty-duplicate-name.py +23 -0
- data/ext/gyp/test/ninja/empty-and-non-empty-duplicate-name/subdir/included.gyp +19 -0
- data/ext/gyp/test/ninja/empty-and-non-empty-duplicate-name/test.gyp +19 -0
- data/ext/gyp/test/ninja/normalize-paths-win/gyptest-normalize-paths.py +46 -0
- data/ext/gyp/test/ninja/normalize-paths-win/hello.cc +7 -0
- data/ext/gyp/test/ninja/normalize-paths-win/normalize-paths.gyp +68 -0
- data/ext/gyp/test/ninja/s-needs-no-depfiles/empty.s +1 -0
- data/ext/gyp/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py +42 -0
- data/ext/gyp/test/ninja/s-needs-no-depfiles/s-needs-no-depfiles.gyp +13 -0
- data/ext/gyp/test/ninja/solibs_avoid_relinking/gyptest-solibs-avoid-relinking.py +48 -0
- data/ext/gyp/test/ninja/solibs_avoid_relinking/main.cc +5 -0
- data/ext/gyp/test/ninja/solibs_avoid_relinking/solib.cc +8 -0
- data/ext/gyp/test/ninja/solibs_avoid_relinking/solibs_avoid_relinking.gyp +38 -0
- data/ext/gyp/test/ninja/use-console/foo.bar +5 -0
- data/ext/gyp/test/ninja/use-console/gyptest-use-console.py +29 -0
- data/ext/gyp/test/ninja/use-console/use-console.gyp +60 -0
- data/ext/gyp/test/ninja/use-custom-environment-files/gyptest-use-custom-environment-files.py +28 -0
- data/ext/gyp/test/ninja/use-custom-environment-files/use-custom-environment-files.cc +7 -0
- data/ext/gyp/test/ninja/use-custom-environment-files/use-custom-environment-files.gyp +15 -0
- data/ext/gyp/test/no-cpp/gyptest-no-cpp.py +53 -0
- data/ext/gyp/test/no-cpp/src/call-f-main.c +2 -0
- data/ext/gyp/test/no-cpp/src/empty-main.c +1 -0
- data/ext/gyp/test/no-cpp/src/f.cc +3 -0
- data/ext/gyp/test/no-cpp/src/test.gyp +25 -0
- data/ext/gyp/test/no-output/gyptest-no-output.py +21 -0
- data/ext/gyp/test/no-output/src/nooutput.gyp +17 -0
- data/ext/gyp/test/product/gyptest-product.py +43 -0
- data/ext/gyp/test/product/hello.c +15 -0
- data/ext/gyp/test/product/product.gyp +128 -0
- data/ext/gyp/test/prune_targets/gyptest-prune-targets.py +66 -0
- data/ext/gyp/test/prune_targets/lib1.cc +6 -0
- data/ext/gyp/test/prune_targets/lib2.cc +6 -0
- data/ext/gyp/test/prune_targets/lib3.cc +6 -0
- data/ext/gyp/test/prune_targets/lib_indirect.cc +6 -0
- data/ext/gyp/test/prune_targets/program.cc +7 -0
- data/ext/gyp/test/prune_targets/test1.gyp +26 -0
- data/ext/gyp/test/prune_targets/test2.gyp +30 -0
- data/ext/gyp/test/relative/foo/a/a.cc +9 -0
- data/ext/gyp/test/relative/foo/a/a.gyp +13 -0
- data/ext/gyp/test/relative/foo/a/c/c.cc +9 -0
- data/ext/gyp/test/relative/foo/a/c/c.gyp +12 -0
- data/ext/gyp/test/relative/foo/b/b.cc +9 -0
- data/ext/gyp/test/relative/foo/b/b.gyp +9 -0
- data/ext/gyp/test/relative/gyptest-default.py +25 -0
- data/ext/gyp/test/rename/filecase/file.c +1 -0
- data/ext/gyp/test/rename/filecase/test-casesensitive.gyp +15 -0
- data/ext/gyp/test/rename/filecase/test.gyp +14 -0
- data/ext/gyp/test/rename/gyptest-filecase.py +35 -0
- data/ext/gyp/test/restat/gyptest-restat.py +31 -0
- data/ext/gyp/test/restat/src/create_intermediate.py +17 -0
- data/ext/gyp/test/restat/src/restat.gyp +50 -0
- data/ext/gyp/test/restat/src/touch.py +16 -0
- data/ext/gyp/test/rules/gyptest-all.py +84 -0
- data/ext/gyp/test/rules/gyptest-default.py +70 -0
- data/ext/gyp/test/rules/gyptest-input-root.py +26 -0
- data/ext/gyp/test/rules/gyptest-special-variables.py +18 -0
- data/ext/gyp/test/rules/src/actions.gyp +23 -0
- data/ext/gyp/test/rules/src/an_asm.S +6 -0
- data/ext/gyp/test/rules/src/as.bat +7 -0
- data/ext/gyp/test/rules/src/copy-file.py +11 -0
- data/ext/gyp/test/rules/src/external/external.gyp +66 -0
- data/ext/gyp/test/rules/src/external/file1.in +1 -0
- data/ext/gyp/test/rules/src/external/file2.in +1 -0
- data/ext/gyp/test/rules/src/input-root.gyp +24 -0
- data/ext/gyp/test/rules/src/noaction/file1.in +1 -0
- data/ext/gyp/test/rules/src/noaction/no_action_with_rules_fails.gyp +37 -0
- data/ext/gyp/test/rules/src/rule.py +17 -0
- data/ext/gyp/test/rules/src/somefile.ext +0 -0
- data/ext/gyp/test/rules/src/special-variables.gyp +34 -0
- data/ext/gyp/test/rules/src/subdir1/executable.gyp +37 -0
- data/ext/gyp/test/rules/src/subdir1/function1.in +6 -0
- data/ext/gyp/test/rules/src/subdir1/function2.in +6 -0
- data/ext/gyp/test/rules/src/subdir1/program.c +12 -0
- data/ext/gyp/test/rules/src/subdir2/both_rule_and_action_input.gyp +50 -0
- data/ext/gyp/test/rules/src/subdir2/file1.in +1 -0
- data/ext/gyp/test/rules/src/subdir2/file2.in +1 -0
- data/ext/gyp/test/rules/src/subdir2/never_used.gyp +31 -0
- data/ext/gyp/test/rules/src/subdir2/no_action.gyp +38 -0
- data/ext/gyp/test/rules/src/subdir2/no_inputs.gyp +32 -0
- data/ext/gyp/test/rules/src/subdir2/none.gyp +33 -0
- data/ext/gyp/test/rules/src/subdir2/program.c +12 -0
- data/ext/gyp/test/rules/src/subdir3/executable2.gyp +37 -0
- data/ext/gyp/test/rules/src/subdir3/function3.in +6 -0
- data/ext/gyp/test/rules/src/subdir3/program.c +10 -0
- data/ext/gyp/test/rules/src/subdir4/asm-function.assem +10 -0
- data/ext/gyp/test/rules/src/subdir4/build-asm.gyp +49 -0
- data/ext/gyp/test/rules/src/subdir4/program.c +19 -0
- data/ext/gyp/test/rules-dirname/gyptest-dirname.py +57 -0
- data/ext/gyp/test/rules-dirname/src/actions.gyp +15 -0
- data/ext/gyp/test/rules-dirname/src/copy-file.py +11 -0
- data/ext/gyp/test/rules-dirname/src/subdir/a/b/c.gencc +8 -0
- data/ext/gyp/test/rules-dirname/src/subdir/a/b/c.printvars +1 -0
- data/ext/gyp/test/rules-dirname/src/subdir/foo/bar/baz.gencc +8 -0
- data/ext/gyp/test/rules-dirname/src/subdir/foo/bar/baz.printvars +1 -0
- data/ext/gyp/test/rules-dirname/src/subdir/input-rule-dirname.gyp +140 -0
- data/ext/gyp/test/rules-dirname/src/subdir/main.cc +14 -0
- data/ext/gyp/test/rules-dirname/src/subdir/nodir.gencc +8 -0
- data/ext/gyp/test/rules-dirname/src/subdir/printvars.py +14 -0
- data/ext/gyp/test/rules-rebuild/gyptest-all.py +70 -0
- data/ext/gyp/test/rules-rebuild/gyptest-default.py +91 -0
- data/ext/gyp/test/rules-rebuild/src/main.c +12 -0
- data/ext/gyp/test/rules-rebuild/src/make-sources.py +19 -0
- data/ext/gyp/test/rules-rebuild/src/prog1.in +7 -0
- data/ext/gyp/test/rules-rebuild/src/prog2.in +7 -0
- data/ext/gyp/test/rules-rebuild/src/same_target.gyp +31 -0
- data/ext/gyp/test/rules-use-built-dependencies/gyptest-use-built-dependencies.py +23 -0
- data/ext/gyp/test/rules-use-built-dependencies/src/main.cc +17 -0
- data/ext/gyp/test/rules-use-built-dependencies/src/use-built-dependencies-rule.gyp +42 -0
- data/ext/gyp/test/rules-variables/gyptest-rules-variables.py +35 -0
- data/ext/gyp/test/rules-variables/src/input_ext.c +9 -0
- data/ext/gyp/test/rules-variables/src/input_name/test.c +9 -0
- data/ext/gyp/test/rules-variables/src/input_path/subdir/test.c +9 -0
- data/ext/gyp/test/rules-variables/src/subdir/input_dirname.c +9 -0
- data/ext/gyp/test/rules-variables/src/subdir/test.c +18 -0
- data/ext/gyp/test/rules-variables/src/test.input_root.c +9 -0
- data/ext/gyp/test/rules-variables/src/variables.gyp +40 -0
- data/ext/gyp/test/same-gyp-name/gyptest-all.py +38 -0
- data/ext/gyp/test/same-gyp-name/gyptest-default.py +38 -0
- data/ext/gyp/test/same-gyp-name/gyptest-library.py +20 -0
- data/ext/gyp/test/same-gyp-name/library/one/sub.gyp +11 -0
- data/ext/gyp/test/same-gyp-name/library/test.gyp +15 -0
- data/ext/gyp/test/same-gyp-name/library/two/sub.gyp +11 -0
- data/ext/gyp/test/same-gyp-name/src/all.gyp +16 -0
- data/ext/gyp/test/same-gyp-name/src/subdir1/executable.gyp +15 -0
- data/ext/gyp/test/same-gyp-name/src/subdir1/main1.cc +6 -0
- data/ext/gyp/test/same-gyp-name/src/subdir2/executable.gyp +15 -0
- data/ext/gyp/test/same-gyp-name/src/subdir2/main2.cc +6 -0
- data/ext/gyp/test/same-rule-output-file-name/gyptest-all.py +23 -0
- data/ext/gyp/test/same-rule-output-file-name/src/subdir1/subdir1.gyp +30 -0
- data/ext/gyp/test/same-rule-output-file-name/src/subdir2/subdir2.gyp +30 -0
- data/ext/gyp/test/same-rule-output-file-name/src/subdirs.gyp +16 -0
- data/ext/gyp/test/same-rule-output-file-name/src/touch.py +11 -0
- data/ext/gyp/test/same-source-file-name/gyptest-all.py +34 -0
- data/ext/gyp/test/same-source-file-name/gyptest-default.py +34 -0
- data/ext/gyp/test/same-source-file-name/gyptest-pass-executable.py +33 -0
- data/ext/gyp/test/same-source-file-name/gyptest-pass-shared.py +18 -0
- data/ext/gyp/test/same-source-file-name/gyptest-static.py +34 -0
- data/ext/gyp/test/same-source-file-name/src/all.gyp +30 -0
- data/ext/gyp/test/same-source-file-name/src/double-executable.gyp +21 -0
- data/ext/gyp/test/same-source-file-name/src/double-shared.gyp +27 -0
- data/ext/gyp/test/same-source-file-name/src/double-static.gyp +22 -0
- data/ext/gyp/test/same-source-file-name/src/func.c +6 -0
- data/ext/gyp/test/same-source-file-name/src/prog1.c +16 -0
- data/ext/gyp/test/same-source-file-name/src/prog2.c +16 -0
- data/ext/gyp/test/same-source-file-name/src/prog3.c +18 -0
- data/ext/gyp/test/same-source-file-name/src/subdir1/func.c +6 -0
- data/ext/gyp/test/same-source-file-name/src/subdir2/func.c +6 -0
- data/ext/gyp/test/same-target-name/gyptest-same-target-name.py +18 -0
- data/ext/gyp/test/same-target-name/src/all.gyp +16 -0
- data/ext/gyp/test/same-target-name/src/executable1.gyp +15 -0
- data/ext/gyp/test/same-target-name/src/executable2.gyp +15 -0
- data/ext/gyp/test/same-target-name-different-directory/gyptest-all.py +41 -0
- data/ext/gyp/test/same-target-name-different-directory/src/subdir1/subdir1.gyp +66 -0
- data/ext/gyp/test/same-target-name-different-directory/src/subdir2/subdir2.gyp +66 -0
- data/ext/gyp/test/same-target-name-different-directory/src/subdirs.gyp +16 -0
- data/ext/gyp/test/same-target-name-different-directory/src/touch.py +11 -0
- data/ext/gyp/test/sanitize-rule-names/blah.S +0 -0
- data/ext/gyp/test/sanitize-rule-names/gyptest-sanitize-rule-names.py +17 -0
- data/ext/gyp/test/sanitize-rule-names/hello.cc +7 -0
- data/ext/gyp/test/sanitize-rule-names/sanitize-rule-names.gyp +27 -0
- data/ext/gyp/test/sanitize-rule-names/script.py +10 -0
- data/ext/gyp/test/self-dependency/common.gypi +13 -0
- data/ext/gyp/test/self-dependency/dep.gyp +23 -0
- data/ext/gyp/test/self-dependency/gyptest-self-dependency.py +19 -0
- data/ext/gyp/test/self-dependency/self_dependency.gyp +15 -0
- data/ext/gyp/test/sibling/gyptest-all.py +42 -0
- data/ext/gyp/test/sibling/gyptest-relocate.py +44 -0
- data/ext/gyp/test/sibling/src/build/all.gyp +16 -0
- data/ext/gyp/test/sibling/src/prog1/prog1.c +7 -0
- data/ext/gyp/test/sibling/src/prog1/prog1.gyp +15 -0
- data/ext/gyp/test/sibling/src/prog2/prog2.c +7 -0
- data/ext/gyp/test/sibling/src/prog2/prog2.gyp +15 -0
- data/ext/gyp/test/small/gyptest-small.py +56 -0
- data/ext/gyp/test/standalone/gyptest-standalone.py +35 -0
- data/ext/gyp/test/standalone/standalone.gyp +12 -0
- data/ext/gyp/test/standalone-static-library/gyptest-standalone-static-library.py +50 -0
- data/ext/gyp/test/standalone-static-library/invalid.gyp +16 -0
- data/ext/gyp/test/standalone-static-library/mylib.c +7 -0
- data/ext/gyp/test/standalone-static-library/mylib.gyp +26 -0
- data/ext/gyp/test/standalone-static-library/prog.c +7 -0
- data/ext/gyp/test/subdirectory/gyptest-SYMROOT-all.py +36 -0
- data/ext/gyp/test/subdirectory/gyptest-SYMROOT-default.py +37 -0
- data/ext/gyp/test/subdirectory/gyptest-subdir-all.py +34 -0
- data/ext/gyp/test/subdirectory/gyptest-subdir-default.py +34 -0
- data/ext/gyp/test/subdirectory/gyptest-subdir2-deep.py +25 -0
- data/ext/gyp/test/subdirectory/gyptest-top-all.py +43 -0
- data/ext/gyp/test/subdirectory/gyptest-top-default.py +43 -0
- data/ext/gyp/test/subdirectory/src/prog1.c +7 -0
- data/ext/gyp/test/subdirectory/src/prog1.gyp +21 -0
- data/ext/gyp/test/subdirectory/src/subdir/prog2.c +7 -0
- data/ext/gyp/test/subdirectory/src/subdir/prog2.gyp +18 -0
- data/ext/gyp/test/subdirectory/src/subdir/subdir2/prog3.c +7 -0
- data/ext/gyp/test/subdirectory/src/subdir/subdir2/prog3.gyp +18 -0
- data/ext/gyp/test/subdirectory/src/symroot.gypi +16 -0
- data/ext/gyp/test/symlinks/gyptest-symlinks.py +66 -0
- data/ext/gyp/test/symlinks/hello.c +12 -0
- data/ext/gyp/test/symlinks/hello.gyp +15 -0
- data/ext/gyp/test/target/gyptest-target.py +37 -0
- data/ext/gyp/test/target/hello.c +7 -0
- data/ext/gyp/test/target/target.gyp +24 -0
- data/ext/gyp/test/toolsets/gyptest-toolsets.py +31 -0
- data/ext/gyp/test/toolsets/main.cc +13 -0
- data/ext/gyp/test/toolsets/toolsets.cc +11 -0
- data/ext/gyp/test/toolsets/toolsets.gyp +62 -0
- data/ext/gyp/test/toolsets/toolsets_shared.cc +11 -0
- data/ext/gyp/test/toplevel-dir/gyptest-toplevel-dir.py +31 -0
- data/ext/gyp/test/toplevel-dir/src/sub1/main.gyp +18 -0
- data/ext/gyp/test/toplevel-dir/src/sub1/prog1.c +7 -0
- data/ext/gyp/test/toplevel-dir/src/sub2/prog2.c +7 -0
- data/ext/gyp/test/toplevel-dir/src/sub2/prog2.gyp +15 -0
- data/ext/gyp/test/variables/commands/commands-repeated.gyp +128 -0
- data/ext/gyp/test/variables/commands/commands-repeated.gyp.stdout +136 -0
- data/ext/gyp/test/variables/commands/commands-repeated.gypd.golden +77 -0
- data/ext/gyp/test/variables/commands/commands.gyp +91 -0
- data/ext/gyp/test/variables/commands/commands.gyp.ignore-env.stdout +96 -0
- data/ext/gyp/test/variables/commands/commands.gyp.stdout +96 -0
- data/ext/gyp/test/variables/commands/commands.gypd.golden +66 -0
- data/ext/gyp/test/variables/commands/commands.gypi +23 -0
- data/ext/gyp/test/variables/commands/gyptest-commands-ignore-env.py +47 -0
- data/ext/gyp/test/variables/commands/gyptest-commands-repeated-multidir.py +23 -0
- data/ext/gyp/test/variables/commands/gyptest-commands-repeated.py +40 -0
- data/ext/gyp/test/variables/commands/gyptest-commands.py +40 -0
- data/ext/gyp/test/variables/commands/repeated_multidir/dir_1/test_1.gyp +13 -0
- data/ext/gyp/test/variables/commands/repeated_multidir/dir_2/test_2.gyp +13 -0
- data/ext/gyp/test/variables/commands/repeated_multidir/main.gyp +16 -0
- data/ext/gyp/test/variables/commands/repeated_multidir/print_cwd_basename.py +11 -0
- data/ext/gyp/test/variables/commands/repeated_multidir/repeated_command_common.gypi +25 -0
- data/ext/gyp/test/variables/commands/test.py +7 -0
- data/ext/gyp/test/variables/commands/update_golden +11 -0
- data/ext/gyp/test/variables/empty/empty.gyp +13 -0
- data/ext/gyp/test/variables/empty/empty.gypi +9 -0
- data/ext/gyp/test/variables/empty/gyptest-empty.py +19 -0
- data/ext/gyp/test/variables/filelist/filelist.gyp.stdout +26 -0
- data/ext/gyp/test/variables/filelist/filelist.gypd.golden +43 -0
- data/ext/gyp/test/variables/filelist/gyptest-filelist-golden.py +53 -0
- data/ext/gyp/test/variables/filelist/gyptest-filelist.py +29 -0
- data/ext/gyp/test/variables/filelist/src/dummy.py +5 -0
- data/ext/gyp/test/variables/filelist/src/filelist.gyp +93 -0
- data/ext/gyp/test/variables/filelist/src/filelist2.gyp +40 -0
- data/ext/gyp/test/variables/filelist/update_golden +8 -0
- data/ext/gyp/test/variables/latelate/gyptest-latelate.py +25 -0
- data/ext/gyp/test/variables/latelate/src/latelate.gyp +34 -0
- data/ext/gyp/test/variables/latelate/src/program.cc +13 -0
- data/ext/gyp/test/variables/variable-in-path/C1/hello.cc +7 -0
- data/ext/gyp/test/variables/variable-in-path/gyptest-variable-in-path.py +23 -0
- data/ext/gyp/test/variables/variable-in-path/variable-in-path.gyp +31 -0
- data/ext/gyp/test/win/asm-files/asm-files.gyp +17 -0
- data/ext/gyp/test/win/asm-files/b.s +0 -0
- data/ext/gyp/test/win/asm-files/c.S +0 -0
- data/ext/gyp/test/win/asm-files/hello.cc +7 -0
- data/ext/gyp/test/win/batch-file-action/batch-file-action.gyp +21 -0
- data/ext/gyp/test/win/batch-file-action/infile +1 -0
- data/ext/gyp/test/win/batch-file-action/somecmd.bat +5 -0
- data/ext/gyp/test/win/command-quote/a.S +0 -0
- data/ext/gyp/test/win/command-quote/bat with spaces.bat +7 -0
- data/ext/gyp/test/win/command-quote/command-quote.gyp +79 -0
- data/ext/gyp/test/win/command-quote/go.bat +7 -0
- data/ext/gyp/test/win/command-quote/subdir/and/another/in-subdir.gyp +27 -0
- data/ext/gyp/test/win/compiler-flags/additional-include-dirs.cc +10 -0
- data/ext/gyp/test/win/compiler-flags/additional-include-dirs.gyp +20 -0
- data/ext/gyp/test/win/compiler-flags/additional-options.cc +10 -0
- data/ext/gyp/test/win/compiler-flags/additional-options.gyp +31 -0
- data/ext/gyp/test/win/compiler-flags/analysis.gyp +40 -0
- data/ext/gyp/test/win/compiler-flags/buffer-security-check.gyp +51 -0
- data/ext/gyp/test/win/compiler-flags/buffer-security.cc +12 -0
- data/ext/gyp/test/win/compiler-flags/calling-convention-cdecl.def +6 -0
- data/ext/gyp/test/win/compiler-flags/calling-convention-fastcall.def +6 -0
- data/ext/gyp/test/win/compiler-flags/calling-convention-stdcall.def +6 -0
- data/ext/gyp/test/win/compiler-flags/calling-convention-vectorcall.def +6 -0
- data/ext/gyp/test/win/compiler-flags/calling-convention.cc +6 -0
- data/ext/gyp/test/win/compiler-flags/calling-convention.gyp +66 -0
- data/ext/gyp/test/win/compiler-flags/character-set-mbcs.cc +11 -0
- data/ext/gyp/test/win/compiler-flags/character-set-unicode.cc +15 -0
- data/ext/gyp/test/win/compiler-flags/character-set.gyp +35 -0
- data/ext/gyp/test/win/compiler-flags/compile-as-managed.cc +9 -0
- data/ext/gyp/test/win/compiler-flags/compile-as-managed.gyp +29 -0
- data/ext/gyp/test/win/compiler-flags/compile-as-winrt.cc +12 -0
- data/ext/gyp/test/win/compiler-flags/compile-as-winrt.gyp +20 -0
- data/ext/gyp/test/win/compiler-flags/debug-format.gyp +48 -0
- data/ext/gyp/test/win/compiler-flags/default-char-is-unsigned.cc +15 -0
- data/ext/gyp/test/win/compiler-flags/default-char-is-unsigned.gyp +20 -0
- data/ext/gyp/test/win/compiler-flags/disable-specific-warnings.cc +9 -0
- data/ext/gyp/test/win/compiler-flags/disable-specific-warnings.gyp +29 -0
- data/ext/gyp/test/win/compiler-flags/enable-enhanced-instruction-set.cc +28 -0
- data/ext/gyp/test/win/compiler-flags/enable-enhanced-instruction-set.gyp +68 -0
- data/ext/gyp/test/win/compiler-flags/exception-handling-on.cc +24 -0
- data/ext/gyp/test/win/compiler-flags/exception-handling.gyp +46 -0
- data/ext/gyp/test/win/compiler-flags/floating-point-model-fast.cc +19 -0
- data/ext/gyp/test/win/compiler-flags/floating-point-model-precise.cc +19 -0
- data/ext/gyp/test/win/compiler-flags/floating-point-model-strict.cc +19 -0
- data/ext/gyp/test/win/compiler-flags/floating-point-model.gyp +43 -0
- data/ext/gyp/test/win/compiler-flags/force-include-files-with-precompiled.cc +10 -0
- data/ext/gyp/test/win/compiler-flags/force-include-files.cc +8 -0
- data/ext/gyp/test/win/compiler-flags/force-include-files.gyp +36 -0
- data/ext/gyp/test/win/compiler-flags/function-level-linking.cc +11 -0
- data/ext/gyp/test/win/compiler-flags/function-level-linking.gyp +28 -0
- data/ext/gyp/test/win/compiler-flags/hello.cc +7 -0
- data/ext/gyp/test/win/compiler-flags/optimizations.gyp +207 -0
- data/ext/gyp/test/win/compiler-flags/pdbname-override.gyp +26 -0
- data/ext/gyp/test/win/compiler-flags/pdbname.cc +7 -0
- data/ext/gyp/test/win/compiler-flags/pdbname.gyp +24 -0
- data/ext/gyp/test/win/compiler-flags/precomp.cc +6 -0
- data/ext/gyp/test/win/compiler-flags/rtti-on.cc +11 -0
- data/ext/gyp/test/win/compiler-flags/rtti.gyp +37 -0
- data/ext/gyp/test/win/compiler-flags/runtime-checks.cc +11 -0
- data/ext/gyp/test/win/compiler-flags/runtime-checks.gyp +29 -0
- data/ext/gyp/test/win/compiler-flags/runtime-library-md.cc +19 -0
- data/ext/gyp/test/win/compiler-flags/runtime-library-mdd.cc +19 -0
- data/ext/gyp/test/win/compiler-flags/runtime-library-mt.cc +19 -0
- data/ext/gyp/test/win/compiler-flags/runtime-library-mtd.cc +19 -0
- data/ext/gyp/test/win/compiler-flags/runtime-library.gyp +48 -0
- data/ext/gyp/test/win/compiler-flags/subdir/header.h +0 -0
- data/ext/gyp/test/win/compiler-flags/treat-wchar-t-as-built-in-type.gyp +33 -0
- data/ext/gyp/test/win/compiler-flags/treat-wchar-t-as-built-in-type1.cc +11 -0
- data/ext/gyp/test/win/compiler-flags/treat-wchar-t-as-built-in-type2.cc +11 -0
- data/ext/gyp/test/win/compiler-flags/uninit.cc +13 -0
- data/ext/gyp/test/win/compiler-flags/warning-as-error.cc +9 -0
- data/ext/gyp/test/win/compiler-flags/warning-as-error.gyp +37 -0
- data/ext/gyp/test/win/compiler-flags/warning-level.gyp +115 -0
- data/ext/gyp/test/win/compiler-flags/warning-level1.cc +8 -0
- data/ext/gyp/test/win/compiler-flags/warning-level2.cc +14 -0
- data/ext/gyp/test/win/compiler-flags/warning-level3.cc +11 -0
- data/ext/gyp/test/win/compiler-flags/warning-level4.cc +10 -0
- data/ext/gyp/test/win/enable-winrt/dllmain.cc +30 -0
- data/ext/gyp/test/win/enable-winrt/enable-winrt.gyp +39 -0
- data/ext/gyp/test/win/generator-output-different-drive/gyptest-generator-output-different-drive.py +44 -0
- data/ext/gyp/test/win/generator-output-different-drive/prog.c +10 -0
- data/ext/gyp/test/win/generator-output-different-drive/prog.gyp +15 -0
- data/ext/gyp/test/win/gyptest-asm-files.py +26 -0
- data/ext/gyp/test/win/gyptest-cl-additional-include-dirs.py +22 -0
- data/ext/gyp/test/win/gyptest-cl-additional-options.py +28 -0
- data/ext/gyp/test/win/gyptest-cl-analysis.py +30 -0
- data/ext/gyp/test/win/gyptest-cl-buffer-security-check.py +53 -0
- data/ext/gyp/test/win/gyptest-cl-calling-convention.py +22 -0
- data/ext/gyp/test/win/gyptest-cl-character-set.py +22 -0
- data/ext/gyp/test/win/gyptest-cl-compile-as-managed.py +24 -0
- data/ext/gyp/test/win/gyptest-cl-compile-as-winrt.py +20 -0
- data/ext/gyp/test/win/gyptest-cl-debug-format.py +43 -0
- data/ext/gyp/test/win/gyptest-cl-default-char-is-unsigned.py +22 -0
- data/ext/gyp/test/win/gyptest-cl-disable-specific-warnings.py +32 -0
- data/ext/gyp/test/win/gyptest-cl-enable-enhanced-instruction-set.py +49 -0
- data/ext/gyp/test/win/gyptest-cl-exception-handling.py +33 -0
- data/ext/gyp/test/win/gyptest-cl-floating-point-model.py +22 -0
- data/ext/gyp/test/win/gyptest-cl-force-include-files.py +22 -0
- data/ext/gyp/test/win/gyptest-cl-function-level-linking.py +54 -0
- data/ext/gyp/test/win/gyptest-cl-optimizations.py +105 -0
- data/ext/gyp/test/win/gyptest-cl-pdbname-override.py +27 -0
- data/ext/gyp/test/win/gyptest-cl-pdbname.py +30 -0
- data/ext/gyp/test/win/gyptest-cl-rtti.py +30 -0
- data/ext/gyp/test/win/gyptest-cl-runtime-checks.py +30 -0
- data/ext/gyp/test/win/gyptest-cl-runtime-library.py +22 -0
- data/ext/gyp/test/win/gyptest-cl-treat-wchar-t-as-built-in-type.py +22 -0
- data/ext/gyp/test/win/gyptest-cl-warning-as-error.py +30 -0
- data/ext/gyp/test/win/gyptest-cl-warning-level.py +41 -0
- data/ext/gyp/test/win/gyptest-command-quote.py +42 -0
- data/ext/gyp/test/win/gyptest-crosscompile-ar.py +29 -0
- data/ext/gyp/test/win/gyptest-lib-ltcg.py +22 -0
- data/ext/gyp/test/win/gyptest-link-additional-deps.py +22 -0
- data/ext/gyp/test/win/gyptest-link-additional-options.py +22 -0
- data/ext/gyp/test/win/gyptest-link-aslr.py +35 -0
- data/ext/gyp/test/win/gyptest-link-base-address.py +62 -0
- data/ext/gyp/test/win/gyptest-link-debug-info.py +26 -0
- data/ext/gyp/test/win/gyptest-link-default-libs.py +22 -0
- data/ext/gyp/test/win/gyptest-link-deffile.py +43 -0
- data/ext/gyp/test/win/gyptest-link-defrelink.py +56 -0
- data/ext/gyp/test/win/gyptest-link-delay-load-dlls.py +35 -0
- data/ext/gyp/test/win/gyptest-link-embed-manifest.py +100 -0
- data/ext/gyp/test/win/gyptest-link-enable-uac.py +104 -0
- data/ext/gyp/test/win/gyptest-link-enable-winrt-app-revision.py +43 -0
- data/ext/gyp/test/win/gyptest-link-enable-winrt-target-platform-version.py +47 -0
- data/ext/gyp/test/win/gyptest-link-enable-winrt.py +37 -0
- data/ext/gyp/test/win/gyptest-link-entrypointsymbol.py +24 -0
- data/ext/gyp/test/win/gyptest-link-fixed-base.py +40 -0
- data/ext/gyp/test/win/gyptest-link-force-symbol-reference.py +26 -0
- data/ext/gyp/test/win/gyptest-link-generate-manifest.py +127 -0
- data/ext/gyp/test/win/gyptest-link-incremental.py +37 -0
- data/ext/gyp/test/win/gyptest-link-large-address-aware.py +35 -0
- data/ext/gyp/test/win/gyptest-link-large-pdb.py +76 -0
- data/ext/gyp/test/win/gyptest-link-library-adjust.py +21 -0
- data/ext/gyp/test/win/gyptest-link-library-directories.py +35 -0
- data/ext/gyp/test/win/gyptest-link-ltcg.py +44 -0
- data/ext/gyp/test/win/gyptest-link-mapfile.py +44 -0
- data/ext/gyp/test/win/gyptest-link-nodefaultlib.py +24 -0
- data/ext/gyp/test/win/gyptest-link-noimportlib.py +30 -0
- data/ext/gyp/test/win/gyptest-link-nxcompat.py +37 -0
- data/ext/gyp/test/win/gyptest-link-opt-icf.py +41 -0
- data/ext/gyp/test/win/gyptest-link-opt-ref.py +40 -0
- data/ext/gyp/test/win/gyptest-link-ordering.py +103 -0
- data/ext/gyp/test/win/gyptest-link-outputfile.py +28 -0
- data/ext/gyp/test/win/gyptest-link-pdb-no-output.py +25 -0
- data/ext/gyp/test/win/gyptest-link-pdb-output.py +33 -0
- data/ext/gyp/test/win/gyptest-link-pdb.py +35 -0
- data/ext/gyp/test/win/gyptest-link-pgo.py +75 -0
- data/ext/gyp/test/win/gyptest-link-profile.py +37 -0
- data/ext/gyp/test/win/gyptest-link-restat-importlib.py +47 -0
- data/ext/gyp/test/win/gyptest-link-safeseh.py +46 -0
- data/ext/gyp/test/win/gyptest-link-shard.py +30 -0
- data/ext/gyp/test/win/gyptest-link-stacksize.py +62 -0
- data/ext/gyp/test/win/gyptest-link-subsystem.py +38 -0
- data/ext/gyp/test/win/gyptest-link-target-machine.py +28 -0
- data/ext/gyp/test/win/gyptest-link-tsaware.py +33 -0
- data/ext/gyp/test/win/gyptest-link-uldi-depending-on-module.py +24 -0
- data/ext/gyp/test/win/gyptest-link-uldi.py +28 -0
- data/ext/gyp/test/win/gyptest-link-unsupported-manifest.py +27 -0
- data/ext/gyp/test/win/gyptest-link-update-manifest.py +104 -0
- data/ext/gyp/test/win/gyptest-link-warnings-as-errors.py +24 -0
- data/ext/gyp/test/win/gyptest-long-command-line.py +23 -0
- data/ext/gyp/test/win/gyptest-macro-projectname.py +24 -0
- data/ext/gyp/test/win/gyptest-macro-targetext.py +26 -0
- data/ext/gyp/test/win/gyptest-macro-targetfilename.py +37 -0
- data/ext/gyp/test/win/gyptest-macro-targetname.py +29 -0
- data/ext/gyp/test/win/gyptest-macro-targetpath.py +30 -0
- data/ext/gyp/test/win/gyptest-macro-vcinstalldir.py +24 -0
- data/ext/gyp/test/win/gyptest-macros-containing-gyp.py +21 -0
- data/ext/gyp/test/win/gyptest-macros-in-inputs-and-outputs.py +27 -0
- data/ext/gyp/test/win/gyptest-midl-excluded.py +22 -0
- data/ext/gyp/test/win/gyptest-midl-includedirs.py +21 -0
- data/ext/gyp/test/win/gyptest-midl-rules.py +28 -0
- data/ext/gyp/test/win/gyptest-ml-safeseh.py +22 -0
- data/ext/gyp/test/win/gyptest-quoting-commands.py +25 -0
- data/ext/gyp/test/win/gyptest-rc-build.py +29 -0
- data/ext/gyp/test/win/gyptest-sys.py +27 -0
- data/ext/gyp/test/win/gyptest-system-include.py +21 -0
- data/ext/gyp/test/win/idl-excluded/bad.idl +6 -0
- data/ext/gyp/test/win/idl-excluded/copy-file.py +11 -0
- data/ext/gyp/test/win/idl-excluded/idl-excluded.gyp +58 -0
- data/ext/gyp/test/win/idl-excluded/program.cc +7 -0
- data/ext/gyp/test/win/idl-includedirs/hello.cc +7 -0
- data/ext/gyp/test/win/idl-includedirs/idl-includedirs.gyp +26 -0
- data/ext/gyp/test/win/idl-includedirs/subdir/bar.idl +13 -0
- data/ext/gyp/test/win/idl-includedirs/subdir/foo.idl +14 -0
- data/ext/gyp/test/win/idl-rules/Window.idl +9 -0
- data/ext/gyp/test/win/idl-rules/basic-idl.gyp +67 -0
- data/ext/gyp/test/win/idl-rules/history_indexer.idl +17 -0
- data/ext/gyp/test/win/idl-rules/history_indexer_user.cc +15 -0
- data/ext/gyp/test/win/idl-rules/idl_compiler.py +17 -0
- data/ext/gyp/test/win/importlib/dll_no_exports.cc +9 -0
- data/ext/gyp/test/win/importlib/has-exports.cc +10 -0
- data/ext/gyp/test/win/importlib/hello.cc +9 -0
- data/ext/gyp/test/win/importlib/importlib.gyp +30 -0
- data/ext/gyp/test/win/importlib/noimplib.gyp +16 -0
- data/ext/gyp/test/win/large-pdb/dllmain.cc +9 -0
- data/ext/gyp/test/win/large-pdb/large-pdb.gyp +98 -0
- data/ext/gyp/test/win/large-pdb/main.cc +7 -0
- data/ext/gyp/test/win/lib-crosscompile/answer.cc +9 -0
- data/ext/gyp/test/win/lib-crosscompile/answer.h +5 -0
- data/ext/gyp/test/win/lib-crosscompile/use_host_ar.gyp +17 -0
- data/ext/gyp/test/win/lib-flags/answer.cc +9 -0
- data/ext/gyp/test/win/lib-flags/answer.h +5 -0
- data/ext/gyp/test/win/lib-flags/ltcg.gyp +21 -0
- data/ext/gyp/test/win/linker-flags/a/x.cc +7 -0
- data/ext/gyp/test/win/linker-flags/a/z.cc +7 -0
- data/ext/gyp/test/win/linker-flags/additional-deps.cc +10 -0
- data/ext/gyp/test/win/linker-flags/additional-deps.gyp +30 -0
- data/ext/gyp/test/win/linker-flags/additional-options.gyp +29 -0
- data/ext/gyp/test/win/linker-flags/aslr.gyp +35 -0
- data/ext/gyp/test/win/linker-flags/b/y.cc +7 -0
- data/ext/gyp/test/win/linker-flags/base-address.gyp +38 -0
- data/ext/gyp/test/win/linker-flags/debug-info.gyp +28 -0
- data/ext/gyp/test/win/linker-flags/deffile-multiple.gyp +17 -0
- data/ext/gyp/test/win/linker-flags/deffile.cc +13 -0
- data/ext/gyp/test/win/linker-flags/deffile.def +8 -0
- data/ext/gyp/test/win/linker-flags/deffile.gyp +38 -0
- data/ext/gyp/test/win/linker-flags/delay-load-dlls.gyp +35 -0
- data/ext/gyp/test/win/linker-flags/delay-load.cc +10 -0
- data/ext/gyp/test/win/linker-flags/embed-manifest.gyp +109 -0
- data/ext/gyp/test/win/linker-flags/enable-uac.gyp +45 -0
- data/ext/gyp/test/win/linker-flags/entrypointsymbol.cc +13 -0
- data/ext/gyp/test/win/linker-flags/entrypointsymbol.gyp +28 -0
- data/ext/gyp/test/win/linker-flags/extra.manifest +11 -0
- data/ext/gyp/test/win/linker-flags/extra2.manifest +11 -0
- data/ext/gyp/test/win/linker-flags/fixed-base.gyp +52 -0
- data/ext/gyp/test/win/linker-flags/force-symbol-reference.gyp +39 -0
- data/ext/gyp/test/win/linker-flags/generate-manifest.gyp +166 -0
- data/ext/gyp/test/win/linker-flags/hello.cc +7 -0
- data/ext/gyp/test/win/linker-flags/incremental.gyp +65 -0
- data/ext/gyp/test/win/linker-flags/inline_test.cc +12 -0
- data/ext/gyp/test/win/linker-flags/inline_test.h +5 -0
- data/ext/gyp/test/win/linker-flags/inline_test_main.cc +15 -0
- data/ext/gyp/test/win/linker-flags/large-address-aware.gyp +28 -0
- data/ext/gyp/test/win/linker-flags/library-adjust.cc +10 -0
- data/ext/gyp/test/win/linker-flags/library-adjust.gyp +16 -0
- data/ext/gyp/test/win/linker-flags/library-directories-define.cc +7 -0
- data/ext/gyp/test/win/linker-flags/library-directories-reference.cc +10 -0
- data/ext/gyp/test/win/linker-flags/library-directories.gyp +42 -0
- data/ext/gyp/test/win/linker-flags/link-ordering.gyp +95 -0
- data/ext/gyp/test/win/linker-flags/link-warning.cc +10 -0
- data/ext/gyp/test/win/linker-flags/ltcg.gyp +42 -0
- data/ext/gyp/test/win/linker-flags/main-crt.c +8 -0
- data/ext/gyp/test/win/linker-flags/manifest-in-comment.cc +13 -0
- data/ext/gyp/test/win/linker-flags/mapfile.cc +12 -0
- data/ext/gyp/test/win/linker-flags/mapfile.gyp +45 -0
- data/ext/gyp/test/win/linker-flags/no-default-libs.cc +18 -0
- data/ext/gyp/test/win/linker-flags/no-default-libs.gyp +13 -0
- data/ext/gyp/test/win/linker-flags/nodefaultlib.cc +13 -0
- data/ext/gyp/test/win/linker-flags/nodefaultlib.gyp +30 -0
- data/ext/gyp/test/win/linker-flags/nxcompat.gyp +35 -0
- data/ext/gyp/test/win/linker-flags/opt-icf.cc +29 -0
- data/ext/gyp/test/win/linker-flags/opt-icf.gyp +63 -0
- data/ext/gyp/test/win/linker-flags/opt-ref.cc +11 -0
- data/ext/gyp/test/win/linker-flags/opt-ref.gyp +56 -0
- data/ext/gyp/test/win/linker-flags/outputfile.gyp +58 -0
- data/ext/gyp/test/win/linker-flags/pdb-output.gyp +49 -0
- data/ext/gyp/test/win/linker-flags/pgo.gyp +143 -0
- data/ext/gyp/test/win/linker-flags/profile.gyp +50 -0
- data/ext/gyp/test/win/linker-flags/program-database.gyp +40 -0
- data/ext/gyp/test/win/linker-flags/safeseh.gyp +79 -0
- data/ext/gyp/test/win/linker-flags/safeseh_hello.cc +11 -0
- data/ext/gyp/test/win/linker-flags/safeseh_zero.asm +10 -0
- data/ext/gyp/test/win/linker-flags/safeseh_zero64.asm +9 -0
- data/ext/gyp/test/win/linker-flags/stacksize.gyp +44 -0
- data/ext/gyp/test/win/linker-flags/subdir/library.gyp +13 -0
- data/ext/gyp/test/win/linker-flags/subsystem-windows.cc +9 -0
- data/ext/gyp/test/win/linker-flags/subsystem.gyp +70 -0
- data/ext/gyp/test/win/linker-flags/target-machine.gyp +48 -0
- data/ext/gyp/test/win/linker-flags/tsaware.gyp +28 -0
- data/ext/gyp/test/win/linker-flags/unsupported-manifest.gyp +13 -0
- data/ext/gyp/test/win/linker-flags/update_pgd.py +35 -0
- data/ext/gyp/test/win/linker-flags/warn-as-error.gyp +33 -0
- data/ext/gyp/test/win/linker-flags/x.cc +7 -0
- data/ext/gyp/test/win/linker-flags/y.cc +7 -0
- data/ext/gyp/test/win/linker-flags/z.cc +7 -0
- data/ext/gyp/test/win/long-command-line/function.cc +7 -0
- data/ext/gyp/test/win/long-command-line/hello.cc +7 -0
- data/ext/gyp/test/win/long-command-line/long-command-line.gyp +54 -0
- data/ext/gyp/test/win/ml-safeseh/a.asm +10 -0
- data/ext/gyp/test/win/ml-safeseh/hello.cc +11 -0
- data/ext/gyp/test/win/ml-safeseh/ml-safeseh.gyp +24 -0
- data/ext/gyp/test/win/precompiled/gyptest-all.py +21 -0
- data/ext/gyp/test/win/precompiled/hello.c +14 -0
- data/ext/gyp/test/win/precompiled/hello.gyp +28 -0
- data/ext/gyp/test/win/precompiled/hello2.c +13 -0
- data/ext/gyp/test/win/precompiled/precomp.c +8 -0
- data/ext/gyp/test/win/rc-build/Resource.h +26 -0
- data/ext/gyp/test/win/rc-build/hello.cpp +30 -0
- data/ext/gyp/test/win/rc-build/hello.gyp +92 -0
- data/ext/gyp/test/win/rc-build/hello.h +3 -0
- data/ext/gyp/test/win/rc-build/hello.ico +0 -0
- data/ext/gyp/test/win/rc-build/hello.rc +86 -0
- data/ext/gyp/test/win/rc-build/hello3.rc +87 -0
- data/ext/gyp/test/win/rc-build/small.ico +0 -0
- data/ext/gyp/test/win/rc-build/subdir/hello2.rc +87 -0
- data/ext/gyp/test/win/rc-build/subdir/include.h +1 -0
- data/ext/gyp/test/win/rc-build/targetver.h +24 -0
- data/ext/gyp/test/win/shard/hello.cc +7 -0
- data/ext/gyp/test/win/shard/hello1.cc +7 -0
- data/ext/gyp/test/win/shard/hello2.cc +7 -0
- data/ext/gyp/test/win/shard/hello3.cc +7 -0
- data/ext/gyp/test/win/shard/hello4.cc +7 -0
- data/ext/gyp/test/win/shard/shard.gyp +31 -0
- data/ext/gyp/test/win/shard/shard_ref.gyp +41 -0
- data/ext/gyp/test/win/system-include/bar/header.h +0 -0
- data/ext/gyp/test/win/system-include/common/commonheader.h +0 -0
- data/ext/gyp/test/win/system-include/foo/header.h +0 -0
- data/ext/gyp/test/win/system-include/main.cc +4 -0
- data/ext/gyp/test/win/system-include/test.gyp +26 -0
- data/ext/gyp/test/win/uldi/a.cc +7 -0
- data/ext/gyp/test/win/uldi/b.cc +7 -0
- data/ext/gyp/test/win/uldi/dll.cc +6 -0
- data/ext/gyp/test/win/uldi/exe.cc +7 -0
- data/ext/gyp/test/win/uldi/main.cc +10 -0
- data/ext/gyp/test/win/uldi/uldi-depending-on-module.gyp +42 -0
- data/ext/gyp/test/win/uldi/uldi.gyp +45 -0
- data/ext/gyp/test/win/vs-macros/as.py +20 -0
- data/ext/gyp/test/win/vs-macros/containing-gyp.gyp +39 -0
- data/ext/gyp/test/win/vs-macros/do_stuff.py +8 -0
- data/ext/gyp/test/win/vs-macros/hello.cc +7 -0
- data/ext/gyp/test/win/vs-macros/input-output-macros.gyp +32 -0
- data/ext/gyp/test/win/vs-macros/input.S +0 -0
- data/ext/gyp/test/win/vs-macros/projectname.gyp +29 -0
- data/ext/gyp/test/win/vs-macros/stuff.blah +1 -0
- data/ext/gyp/test/win/vs-macros/targetext.gyp +59 -0
- data/ext/gyp/test/win/vs-macros/targetfilename.gyp +59 -0
- data/ext/gyp/test/win/vs-macros/targetname.gyp +52 -0
- data/ext/gyp/test/win/vs-macros/targetpath.gyp +59 -0
- data/ext/gyp/test/win/vs-macros/test_exists.py +10 -0
- data/ext/gyp/test/win/vs-macros/vcinstalldir.gyp +41 -0
- data/ext/gyp/test/win/win-driver-target-type/win-driver-target-type.c +10 -0
- data/ext/gyp/test/win/win-driver-target-type/win-driver-target-type.gyp +32 -0
- data/ext/gyp/test/win/win-driver-target-type/win-driver-target-type.h +13 -0
- data/ext/gyp/test/win/win-driver-target-type/win-driver-target-type.rc +14 -0
- data/ext/gyp/test/win/win-tool/copies_readonly_files.gyp +29 -0
- data/ext/gyp/test/win/win-tool/gyptest-win-tool-handles-readonly-files.py +55 -0
- data/ext/gyp/test/win/winrt-app-type-revision/dllmain.cc +30 -0
- data/ext/gyp/test/win/winrt-app-type-revision/winrt-app-type-revison.gyp +43 -0
- data/ext/gyp/test/win/winrt-target-platform-version/dllmain.cc +30 -0
- data/ext/gyp/test/win/winrt-target-platform-version/winrt-target-platform-version.gyp +49 -0
- data/ext/gyp/test/xcode-ninja/list_excluded/gyptest-all.py +49 -0
- data/ext/gyp/test/xcode-ninja/list_excluded/hello.cpp +7 -0
- data/ext/gyp/test/xcode-ninja/list_excluded/hello_exclude.gyp +19 -0
- data/ext/gyp/test/xcode-ninja/list_excluded/hello_excluded.cpp +7 -0
- data/ext/gyp/tools/README +15 -0
- data/ext/gyp/tools/Xcode/README +5 -0
- data/ext/gyp/tools/Xcode/Specifications/gyp.pbfilespec +27 -0
- data/ext/gyp/tools/Xcode/Specifications/gyp.xclangspec +226 -0
- data/ext/gyp/tools/emacs/README +12 -0
- data/ext/gyp/tools/emacs/gyp-tests.el +63 -0
- data/ext/gyp/tools/emacs/gyp.el +275 -0
- data/ext/gyp/tools/emacs/run-unit-tests.sh +7 -0
- data/ext/gyp/tools/emacs/testdata/media.gyp +1105 -0
- data/ext/gyp/tools/emacs/testdata/media.gyp.fontified +1107 -0
- data/ext/gyp/tools/graphviz.py +102 -0
- data/ext/gyp/tools/pretty_gyp.py +156 -0
- data/ext/gyp/tools/pretty_sln.py +171 -0
- data/ext/gyp/tools/pretty_vcproj.py +337 -0
- data/ext/libuv/.gitattributes +1 -0
- data/ext/libuv/.github/ISSUE_TEMPLATE.md +13 -0
- data/ext/libuv/.github/stale.yml +22 -0
- data/ext/libuv/.gitignore +80 -0
- data/ext/libuv/.mailmap +50 -0
- data/ext/libuv/AUTHORS +415 -0
- data/ext/libuv/CMakeLists.txt +430 -0
- data/ext/libuv/CONTRIBUTING.md +172 -0
- data/ext/libuv/ChangeLog +4548 -0
- data/ext/libuv/LICENSE +70 -0
- data/ext/libuv/LICENSE-docs +396 -0
- data/ext/libuv/MAINTAINERS.md +48 -0
- data/ext/libuv/Makefile.am +548 -0
- data/ext/libuv/README.md +431 -0
- data/ext/libuv/SUPPORTED_PLATFORMS.md +68 -0
- data/ext/libuv/android-configure-arm +23 -0
- data/ext/libuv/android-configure-arm64 +23 -0
- data/ext/libuv/android-configure-x86 +23 -0
- data/ext/libuv/android-configure-x86_64 +25 -0
- data/ext/libuv/appveyor.yml +32 -0
- data/ext/libuv/autogen.sh +46 -0
- data/ext/libuv/common.gypi +213 -0
- data/ext/libuv/configure.ac +82 -0
- data/ext/libuv/docs/Makefile +183 -0
- data/ext/libuv/docs/code/cgi/main.c +81 -0
- data/ext/libuv/docs/code/cgi/tick.c +13 -0
- data/ext/libuv/docs/code/detach/main.c +31 -0
- data/ext/libuv/docs/code/dns/main.c +80 -0
- data/ext/libuv/docs/code/helloworld/main.c +15 -0
- data/ext/libuv/docs/code/idle-basic/main.c +24 -0
- data/ext/libuv/docs/code/idle-compute/main.c +43 -0
- data/ext/libuv/docs/code/interfaces/main.c +33 -0
- data/ext/libuv/docs/code/locks/main.c +57 -0
- data/ext/libuv/docs/code/multi-echo-server/hammer.js +20 -0
- data/ext/libuv/docs/code/multi-echo-server/main.c +114 -0
- data/ext/libuv/docs/code/multi-echo-server/worker.c +88 -0
- data/ext/libuv/docs/code/onchange/main.c +44 -0
- data/ext/libuv/docs/code/pipe-echo-server/main.c +94 -0
- data/ext/libuv/docs/code/plugin/hello.c +5 -0
- data/ext/libuv/docs/code/plugin/main.c +39 -0
- data/ext/libuv/docs/code/plugin/plugin.h +7 -0
- data/ext/libuv/docs/code/proc-streams/main.c +49 -0
- data/ext/libuv/docs/code/proc-streams/test.c +8 -0
- data/ext/libuv/docs/code/progress/main.c +47 -0
- data/ext/libuv/docs/code/queue-cancel/main.c +59 -0
- data/ext/libuv/docs/code/queue-work/main.c +44 -0
- data/ext/libuv/docs/code/ref-timer/main.c +29 -0
- data/ext/libuv/docs/code/signal/main.c +66 -0
- data/ext/libuv/docs/code/spawn/main.c +36 -0
- data/ext/libuv/docs/code/tcp-echo-server/main.c +87 -0
- data/ext/libuv/docs/code/thread-create/main.c +36 -0
- data/ext/libuv/docs/code/tty/main.c +29 -0
- data/ext/libuv/docs/code/tty-gravity/main.c +48 -0
- data/ext/libuv/docs/code/udp-dhcp/main.c +127 -0
- data/ext/libuv/docs/code/uvcat/main.c +63 -0
- data/ext/libuv/docs/code/uvstop/main.c +33 -0
- data/ext/libuv/docs/code/uvtee/main.c +80 -0
- data/ext/libuv/docs/code/uvwget/main.c +166 -0
- data/ext/libuv/docs/make.bat +243 -0
- data/ext/libuv/docs/src/api.rst +35 -0
- data/ext/libuv/docs/src/async.rst +65 -0
- data/ext/libuv/docs/src/check.rst +46 -0
- data/ext/libuv/docs/src/conf.py +348 -0
- data/ext/libuv/docs/src/design.rst +140 -0
- data/ext/libuv/docs/src/dll.rst +44 -0
- data/ext/libuv/docs/src/dns.rst +108 -0
- data/ext/libuv/docs/src/errors.rst +365 -0
- data/ext/libuv/docs/src/fs.rst +689 -0
- data/ext/libuv/docs/src/fs_event.rst +132 -0
- data/ext/libuv/docs/src/fs_poll.rst +77 -0
- data/ext/libuv/docs/src/guide/about.rst +22 -0
- data/ext/libuv/docs/src/guide/basics.rst +219 -0
- data/ext/libuv/docs/src/guide/eventloops.rst +48 -0
- data/ext/libuv/docs/src/guide/filesystem.rst +330 -0
- data/ext/libuv/docs/src/guide/introduction.rst +75 -0
- data/ext/libuv/docs/src/guide/networking.rst +250 -0
- data/ext/libuv/docs/src/guide/processes.rst +406 -0
- data/ext/libuv/docs/src/guide/threads.rst +385 -0
- data/ext/libuv/docs/src/guide/utilities.rst +437 -0
- data/ext/libuv/docs/src/guide.rst +22 -0
- data/ext/libuv/docs/src/handle.rst +283 -0
- data/ext/libuv/docs/src/idle.rst +54 -0
- data/ext/libuv/docs/src/index.rst +62 -0
- data/ext/libuv/docs/src/loop.rst +238 -0
- data/ext/libuv/docs/src/migration_010_100.rst +244 -0
- data/ext/libuv/docs/src/misc.rst +702 -0
- data/ext/libuv/docs/src/pipe.rst +116 -0
- data/ext/libuv/docs/src/poll.rst +121 -0
- data/ext/libuv/docs/src/prepare.rst +46 -0
- data/ext/libuv/docs/src/process.rst +250 -0
- data/ext/libuv/docs/src/request.rst +116 -0
- data/ext/libuv/docs/src/signal.rst +101 -0
- data/ext/libuv/docs/src/sphinx-plugins/manpage.py +45 -0
- data/ext/libuv/docs/src/static/architecture.png +0 -0
- data/ext/libuv/docs/src/static/diagrams.key/Data/st0-311.jpg +0 -0
- data/ext/libuv/docs/src/static/diagrams.key/Data/st1-475.jpg +0 -0
- data/ext/libuv/docs/src/static/diagrams.key/Index.zip +0 -0
- data/ext/libuv/docs/src/static/diagrams.key/Metadata/BuildVersionHistory.plist +8 -0
- data/ext/libuv/docs/src/static/diagrams.key/Metadata/DocumentIdentifier +1 -0
- data/ext/libuv/docs/src/static/diagrams.key/Metadata/Properties.plist +0 -0
- data/ext/libuv/docs/src/static/diagrams.key/preview-micro.jpg +0 -0
- data/ext/libuv/docs/src/static/diagrams.key/preview-web.jpg +0 -0
- data/ext/libuv/docs/src/static/diagrams.key/preview.jpg +0 -0
- data/ext/libuv/docs/src/static/favicon.ico +0 -0
- data/ext/libuv/docs/src/static/logo.png +0 -0
- data/ext/libuv/docs/src/static/loop_iteration.png +0 -0
- data/ext/libuv/docs/src/stream.rst +237 -0
- data/ext/libuv/docs/src/tcp.rst +125 -0
- data/ext/libuv/docs/src/threading.rst +197 -0
- data/ext/libuv/docs/src/threadpool.rst +69 -0
- data/ext/libuv/docs/src/timer.rst +81 -0
- data/ext/libuv/docs/src/tty.rst +139 -0
- data/ext/libuv/docs/src/udp.rst +390 -0
- data/ext/libuv/docs/src/upgrading.rst +11 -0
- data/ext/libuv/docs/src/version.rst +60 -0
- data/ext/libuv/gyp_uv.py +73 -0
- data/ext/libuv/img/banner.png +0 -0
- data/ext/libuv/img/logos.svg +152 -0
- data/ext/libuv/include/uv/aix.h +32 -0
- data/ext/libuv/include/uv/android-ifaddrs.h +54 -0
- data/ext/libuv/include/uv/bsd.h +34 -0
- data/ext/libuv/include/uv/darwin.h +61 -0
- data/ext/libuv/include/uv/errno.h +448 -0
- data/ext/libuv/include/uv/linux.h +34 -0
- data/ext/libuv/include/uv/os390.h +33 -0
- data/ext/libuv/include/uv/posix.h +31 -0
- data/ext/libuv/include/uv/stdint-msvc2008.h +247 -0
- data/ext/libuv/include/uv/sunos.h +44 -0
- data/ext/libuv/include/uv/threadpool.h +37 -0
- data/ext/libuv/include/uv/tree.h +768 -0
- data/ext/libuv/include/uv/unix.h +505 -0
- data/ext/libuv/include/uv/version.h +43 -0
- data/ext/libuv/include/uv/win.h +691 -0
- data/ext/libuv/include/uv.h +1782 -0
- data/ext/libuv/libuv.pc.in +12 -0
- data/ext/libuv/m4/.gitignore +4 -0
- data/ext/libuv/m4/as_case.m4 +21 -0
- data/ext/libuv/m4/libuv-check-flags.m4 +319 -0
- data/ext/libuv/src/fs-poll.c +287 -0
- data/ext/libuv/src/heap-inl.h +245 -0
- data/ext/libuv/src/idna.c +291 -0
- data/ext/libuv/src/idna.h +31 -0
- data/ext/libuv/src/inet.c +302 -0
- data/ext/libuv/src/queue.h +108 -0
- data/ext/libuv/src/random.c +123 -0
- data/ext/libuv/src/strscpy.c +17 -0
- data/ext/libuv/src/strscpy.h +18 -0
- data/ext/libuv/src/threadpool.c +388 -0
- data/ext/libuv/src/timer.c +181 -0
- data/ext/libuv/src/unix/aix-common.c +337 -0
- data/ext/libuv/src/unix/aix.c +1066 -0
- data/ext/libuv/src/unix/android-ifaddrs.c +712 -0
- data/ext/libuv/src/unix/async.c +298 -0
- data/ext/libuv/src/unix/atomic-ops.h +59 -0
- data/ext/libuv/src/unix/bsd-ifaddrs.c +161 -0
- data/ext/libuv/src/unix/bsd-proctitle.c +93 -0
- data/ext/libuv/src/unix/core.c +1571 -0
- data/ext/libuv/src/unix/cygwin.c +53 -0
- data/ext/libuv/src/unix/darwin-proctitle.c +202 -0
- data/ext/libuv/src/unix/darwin.c +225 -0
- data/ext/libuv/src/unix/dl.c +80 -0
- data/ext/libuv/src/unix/freebsd.c +290 -0
- data/ext/libuv/src/unix/fs.c +2044 -0
- data/ext/libuv/src/unix/fsevents.c +924 -0
- data/ext/libuv/src/unix/getaddrinfo.c +255 -0
- data/ext/libuv/src/unix/getnameinfo.c +121 -0
- data/ext/libuv/src/unix/haiku.c +167 -0
- data/ext/libuv/src/unix/ibmi.c +249 -0
- data/ext/libuv/src/unix/internal.h +331 -0
- data/ext/libuv/src/unix/kqueue.c +544 -0
- data/ext/libuv/src/unix/linux-core.c +1091 -0
- data/ext/libuv/src/unix/linux-inotify.c +354 -0
- data/ext/libuv/src/unix/linux-syscalls.c +394 -0
- data/ext/libuv/src/unix/linux-syscalls.h +153 -0
- data/ext/libuv/src/unix/loop-watcher.c +68 -0
- data/ext/libuv/src/unix/loop.c +194 -0
- data/ext/libuv/src/unix/netbsd.c +259 -0
- data/ext/libuv/src/unix/no-fsevents.c +42 -0
- data/ext/libuv/src/unix/no-proctitle.c +42 -0
- data/ext/libuv/src/unix/openbsd.c +244 -0
- data/ext/libuv/src/unix/os390-syscalls.c +519 -0
- data/ext/libuv/src/unix/os390-syscalls.h +68 -0
- data/ext/libuv/src/unix/os390.c +1003 -0
- data/ext/libuv/src/unix/pipe.c +377 -0
- data/ext/libuv/src/unix/poll.c +150 -0
- data/ext/libuv/src/unix/posix-hrtime.c +35 -0
- data/ext/libuv/src/unix/posix-poll.c +336 -0
- data/ext/libuv/src/unix/process.c +603 -0
- data/ext/libuv/src/unix/procfs-exepath.c +45 -0
- data/ext/libuv/src/unix/proctitle.c +132 -0
- data/ext/libuv/src/unix/pthread-fixes.c +56 -0
- data/ext/libuv/src/unix/random-devurandom.c +93 -0
- data/ext/libuv/src/unix/random-getentropy.c +57 -0
- data/ext/libuv/src/unix/random-getrandom.c +88 -0
- data/ext/libuv/src/unix/random-sysctl-linux.c +99 -0
- data/ext/libuv/src/unix/signal.c +577 -0
- data/ext/libuv/src/unix/spinlock.h +53 -0
- data/ext/libuv/src/unix/stream.c +1697 -0
- data/ext/libuv/src/unix/sunos.c +836 -0
- data/ext/libuv/src/unix/sysinfo-loadavg.c +36 -0
- data/ext/libuv/src/unix/sysinfo-memory.c +42 -0
- data/ext/libuv/src/unix/tcp.c +450 -0
- data/ext/libuv/src/unix/thread.c +852 -0
- data/ext/libuv/src/unix/tty.c +381 -0
- data/ext/libuv/src/unix/udp.c +1136 -0
- data/ext/libuv/src/uv-common.c +812 -0
- data/ext/libuv/src/uv-common.h +326 -0
- data/ext/libuv/src/uv-data-getter-setters.c +98 -0
- data/ext/libuv/src/version.c +45 -0
- data/ext/libuv/src/win/async.c +98 -0
- data/ext/libuv/src/win/atomicops-inl.h +57 -0
- data/ext/libuv/src/win/core.c +657 -0
- data/ext/libuv/src/win/detect-wakeup.c +35 -0
- data/ext/libuv/src/win/dl.c +136 -0
- data/ext/libuv/src/win/error.c +172 -0
- data/ext/libuv/src/win/fs-event.c +589 -0
- data/ext/libuv/src/win/fs-fd-hash-inl.h +178 -0
- data/ext/libuv/src/win/fs.c +3238 -0
- data/ext/libuv/src/win/getaddrinfo.c +463 -0
- data/ext/libuv/src/win/getnameinfo.c +157 -0
- data/ext/libuv/src/win/handle-inl.h +180 -0
- data/ext/libuv/src/win/handle.c +162 -0
- data/ext/libuv/src/win/internal.h +344 -0
- data/ext/libuv/src/win/loop-watcher.c +122 -0
- data/ext/libuv/src/win/pipe.c +2386 -0
- data/ext/libuv/src/win/poll.c +643 -0
- data/ext/libuv/src/win/process-stdio.c +512 -0
- data/ext/libuv/src/win/process.c +1282 -0
- data/ext/libuv/src/win/req-inl.h +221 -0
- data/ext/libuv/src/win/signal.c +277 -0
- data/ext/libuv/src/win/snprintf.c +42 -0
- data/ext/libuv/src/win/stream-inl.h +54 -0
- data/ext/libuv/src/win/stream.c +243 -0
- data/ext/libuv/src/win/tcp.c +1520 -0
- data/ext/libuv/src/win/thread.c +520 -0
- data/ext/libuv/src/win/tty.c +2348 -0
- data/ext/libuv/src/win/udp.c +1185 -0
- data/ext/libuv/src/win/util.c +1879 -0
- data/ext/libuv/src/win/winapi.c +149 -0
- data/ext/libuv/src/win/winapi.h +4751 -0
- data/ext/libuv/src/win/winsock.c +575 -0
- data/ext/libuv/src/win/winsock.h +201 -0
- data/ext/libuv/test/benchmark-async-pummel.c +119 -0
- data/ext/libuv/test/benchmark-async.c +141 -0
- data/ext/libuv/test/benchmark-fs-stat.c +136 -0
- data/ext/libuv/test/benchmark-getaddrinfo.c +92 -0
- data/ext/libuv/test/benchmark-list.h +163 -0
- data/ext/libuv/test/benchmark-loop-count.c +92 -0
- data/ext/libuv/test/benchmark-million-async.c +112 -0
- data/ext/libuv/test/benchmark-million-timers.c +86 -0
- data/ext/libuv/test/benchmark-multi-accept.c +447 -0
- data/ext/libuv/test/benchmark-ping-pongs.c +221 -0
- data/ext/libuv/test/benchmark-pound.c +351 -0
- data/ext/libuv/test/benchmark-pump.c +476 -0
- data/ext/libuv/test/benchmark-sizes.c +46 -0
- data/ext/libuv/test/benchmark-spawn.c +164 -0
- data/ext/libuv/test/benchmark-tcp-write-batch.c +144 -0
- data/ext/libuv/test/benchmark-thread.c +64 -0
- data/ext/libuv/test/benchmark-udp-pummel.c +243 -0
- data/ext/libuv/test/blackhole-server.c +121 -0
- data/ext/libuv/test/dns-server.c +340 -0
- data/ext/libuv/test/echo-server.c +382 -0
- data/ext/libuv/test/fixtures/empty_file +0 -0
- data/ext/libuv/test/fixtures/load_error.node +1 -0
- data/ext/libuv/test/fixtures/lorem_ipsum.txt +1 -0
- data/ext/libuv/test/run-benchmarks.c +65 -0
- data/ext/libuv/test/run-tests.c +239 -0
- data/ext/libuv/test/runner-unix.c +450 -0
- data/ext/libuv/test/runner-unix.h +36 -0
- data/ext/libuv/test/runner-win.c +357 -0
- data/ext/libuv/test/runner-win.h +41 -0
- data/ext/libuv/test/runner.c +431 -0
- data/ext/libuv/test/runner.h +176 -0
- data/ext/libuv/test/task.h +238 -0
- data/ext/libuv/test/test-active.c +84 -0
- data/ext/libuv/test/test-async-null-cb.c +64 -0
- data/ext/libuv/test/test-async.c +134 -0
- data/ext/libuv/test/test-barrier.c +148 -0
- data/ext/libuv/test/test-callback-order.c +77 -0
- data/ext/libuv/test/test-callback-stack.c +204 -0
- data/ext/libuv/test/test-close-fd.c +80 -0
- data/ext/libuv/test/test-close-order.c +80 -0
- data/ext/libuv/test/test-condvar.c +267 -0
- data/ext/libuv/test/test-connect-unspecified.c +63 -0
- data/ext/libuv/test/test-connection-fail.c +151 -0
- data/ext/libuv/test/test-cwd-and-chdir.c +58 -0
- data/ext/libuv/test/test-default-loop-close.c +59 -0
- data/ext/libuv/test/test-delayed-accept.c +189 -0
- data/ext/libuv/test/test-dlerror.c +61 -0
- data/ext/libuv/test/test-eintr-handling.c +94 -0
- data/ext/libuv/test/test-embed.c +139 -0
- data/ext/libuv/test/test-emfile.c +121 -0
- data/ext/libuv/test/test-env-vars.c +140 -0
- data/ext/libuv/test/test-error.c +79 -0
- data/ext/libuv/test/test-fail-always.c +29 -0
- data/ext/libuv/test/test-fork.c +683 -0
- data/ext/libuv/test/test-fs-copyfile.c +209 -0
- data/ext/libuv/test/test-fs-event.c +1165 -0
- data/ext/libuv/test/test-fs-fd-hash.c +133 -0
- data/ext/libuv/test/test-fs-open-flags.c +435 -0
- data/ext/libuv/test/test-fs-poll.c +300 -0
- data/ext/libuv/test/test-fs-readdir.c +462 -0
- data/ext/libuv/test/test-fs.c +4238 -0
- data/ext/libuv/test/test-get-currentexe.c +86 -0
- data/ext/libuv/test/test-get-loadavg.c +35 -0
- data/ext/libuv/test/test-get-memory.c +40 -0
- data/ext/libuv/test/test-get-passwd.c +86 -0
- data/ext/libuv/test/test-getaddrinfo.c +191 -0
- data/ext/libuv/test/test-gethostname.c +58 -0
- data/ext/libuv/test/test-getnameinfo.c +101 -0
- data/ext/libuv/test/test-getsockname.c +361 -0
- data/ext/libuv/test/test-getters-setters.c +88 -0
- data/ext/libuv/test/test-gettimeofday.c +39 -0
- data/ext/libuv/test/test-handle-fileno.c +125 -0
- data/ext/libuv/test/test-homedir.c +72 -0
- data/ext/libuv/test/test-hrtime.c +52 -0
- data/ext/libuv/test/test-idle.c +99 -0
- data/ext/libuv/test/test-idna.c +195 -0
- data/ext/libuv/test/test-ip4-addr.c +55 -0
- data/ext/libuv/test/test-ip6-addr.c +171 -0
- data/ext/libuv/test/test-ipc-heavy-traffic-deadlock-bug.c +159 -0
- data/ext/libuv/test/test-ipc-send-recv.c +429 -0
- data/ext/libuv/test/test-ipc.c +974 -0
- data/ext/libuv/test/test-list.h +1064 -0
- data/ext/libuv/test/test-loop-alive.c +67 -0
- data/ext/libuv/test/test-loop-close.c +75 -0
- data/ext/libuv/test/test-loop-configure.c +38 -0
- data/ext/libuv/test/test-loop-handles.c +337 -0
- data/ext/libuv/test/test-loop-stop.c +71 -0
- data/ext/libuv/test/test-loop-time.c +63 -0
- data/ext/libuv/test/test-multiple-listen.c +109 -0
- data/ext/libuv/test/test-mutexes.c +182 -0
- data/ext/libuv/test/test-osx-select.c +140 -0
- data/ext/libuv/test/test-pass-always.c +28 -0
- data/ext/libuv/test/test-ping-pong.c +301 -0
- data/ext/libuv/test/test-pipe-bind-error.c +139 -0
- data/ext/libuv/test/test-pipe-close-stdout-read-stdin.c +112 -0
- data/ext/libuv/test/test-pipe-connect-error.c +95 -0
- data/ext/libuv/test/test-pipe-connect-multiple.c +107 -0
- data/ext/libuv/test/test-pipe-connect-prepare.c +83 -0
- data/ext/libuv/test/test-pipe-getsockname.c +266 -0
- data/ext/libuv/test/test-pipe-pending-instances.c +59 -0
- data/ext/libuv/test/test-pipe-sendmsg.c +172 -0
- data/ext/libuv/test/test-pipe-server-close.c +94 -0
- data/ext/libuv/test/test-pipe-set-fchmod.c +90 -0
- data/ext/libuv/test/test-pipe-set-non-blocking.c +99 -0
- data/ext/libuv/test/test-platform-output.c +170 -0
- data/ext/libuv/test/test-poll-close-doesnt-corrupt-stack.c +114 -0
- data/ext/libuv/test/test-poll-close.c +73 -0
- data/ext/libuv/test/test-poll-closesocket.c +92 -0
- data/ext/libuv/test/test-poll-oob.c +210 -0
- data/ext/libuv/test/test-poll.c +668 -0
- data/ext/libuv/test/test-process-priority.c +83 -0
- data/ext/libuv/test/test-process-title-threadsafe.c +89 -0
- data/ext/libuv/test/test-process-title.c +76 -0
- data/ext/libuv/test/test-queue-foreach-delete.c +204 -0
- data/ext/libuv/test/test-random.c +94 -0
- data/ext/libuv/test/test-ref.c +445 -0
- data/ext/libuv/test/test-run-nowait.c +45 -0
- data/ext/libuv/test/test-run-once.c +48 -0
- data/ext/libuv/test/test-semaphore.c +111 -0
- data/ext/libuv/test/test-shutdown-close.c +108 -0
- data/ext/libuv/test/test-shutdown-eof.c +182 -0
- data/ext/libuv/test/test-shutdown-twice.c +85 -0
- data/ext/libuv/test/test-signal-multiple-loops.c +302 -0
- data/ext/libuv/test/test-signal-pending-on-close.c +94 -0
- data/ext/libuv/test/test-signal.c +325 -0
- data/ext/libuv/test/test-socket-buffer-size.c +77 -0
- data/ext/libuv/test/test-spawn.c +1924 -0
- data/ext/libuv/test/test-stdio-over-pipes.c +256 -0
- data/ext/libuv/test/test-strscpy.c +53 -0
- data/ext/libuv/test/test-tcp-alloc-cb-fail.c +123 -0
- data/ext/libuv/test/test-tcp-bind-error.c +254 -0
- data/ext/libuv/test/test-tcp-bind6-error.c +176 -0
- data/ext/libuv/test/test-tcp-close-accept.c +198 -0
- data/ext/libuv/test/test-tcp-close-reset.c +290 -0
- data/ext/libuv/test/test-tcp-close-while-connecting.c +97 -0
- data/ext/libuv/test/test-tcp-close.c +136 -0
- data/ext/libuv/test/test-tcp-connect-error-after-write.c +98 -0
- data/ext/libuv/test/test-tcp-connect-error.c +73 -0
- data/ext/libuv/test/test-tcp-connect-timeout.c +91 -0
- data/ext/libuv/test/test-tcp-connect6-error.c +71 -0
- data/ext/libuv/test/test-tcp-create-socket-early.c +209 -0
- data/ext/libuv/test/test-tcp-flags.c +52 -0
- data/ext/libuv/test/test-tcp-oob.c +146 -0
- data/ext/libuv/test/test-tcp-open.c +400 -0
- data/ext/libuv/test/test-tcp-read-stop.c +76 -0
- data/ext/libuv/test/test-tcp-shutdown-after-write.c +138 -0
- data/ext/libuv/test/test-tcp-try-write-error.c +109 -0
- data/ext/libuv/test/test-tcp-try-write.c +135 -0
- data/ext/libuv/test/test-tcp-unexpected-read.c +117 -0
- data/ext/libuv/test/test-tcp-write-after-connect.c +72 -0
- data/ext/libuv/test/test-tcp-write-fail.c +115 -0
- data/ext/libuv/test/test-tcp-write-queue-order.c +139 -0
- data/ext/libuv/test/test-tcp-write-to-half-open-connection.c +141 -0
- data/ext/libuv/test/test-tcp-writealot.c +180 -0
- data/ext/libuv/test/test-thread-equal.c +45 -0
- data/ext/libuv/test/test-thread.c +286 -0
- data/ext/libuv/test/test-threadpool-cancel.c +349 -0
- data/ext/libuv/test/test-threadpool.c +76 -0
- data/ext/libuv/test/test-timer-again.c +141 -0
- data/ext/libuv/test/test-timer-from-check.c +80 -0
- data/ext/libuv/test/test-timer.c +343 -0
- data/ext/libuv/test/test-tmpdir.c +82 -0
- data/ext/libuv/test/test-tty-duplicate-key.c +321 -0
- data/ext/libuv/test/test-tty.c +464 -0
- data/ext/libuv/test/test-udp-alloc-cb-fail.c +196 -0
- data/ext/libuv/test/test-udp-bind.c +93 -0
- data/ext/libuv/test/test-udp-connect.c +182 -0
- data/ext/libuv/test/test-udp-create-socket-early.c +135 -0
- data/ext/libuv/test/test-udp-dgram-too-big.c +91 -0
- data/ext/libuv/test/test-udp-ipv6.c +200 -0
- data/ext/libuv/test/test-udp-multicast-interface.c +99 -0
- data/ext/libuv/test/test-udp-multicast-interface6.c +103 -0
- data/ext/libuv/test/test-udp-multicast-join.c +181 -0
- data/ext/libuv/test/test-udp-multicast-join6.c +215 -0
- data/ext/libuv/test/test-udp-multicast-ttl.c +94 -0
- data/ext/libuv/test/test-udp-open.c +350 -0
- data/ext/libuv/test/test-udp-options.c +156 -0
- data/ext/libuv/test/test-udp-send-and-recv.c +212 -0
- data/ext/libuv/test/test-udp-send-hang-loop.c +99 -0
- data/ext/libuv/test/test-udp-send-immediate.c +148 -0
- data/ext/libuv/test/test-udp-send-unreachable.c +150 -0
- data/ext/libuv/test/test-udp-try-send.c +121 -0
- data/ext/libuv/test/test-uname.c +69 -0
- data/ext/libuv/test/test-walk-handles.c +77 -0
- data/ext/libuv/test/test-watcher-cross-stop.c +111 -0
- data/ext/libuv/test/test.gyp +293 -0
- data/ext/libuv/tools/make_dist_html.py +124 -0
- data/ext/libuv/tools/vswhere_usability_wrapper.cmd +33 -0
- data/ext/libuv/uv.gyp +368 -0
- data/ext/libuv/vcbuild.bat +184 -0
- data/lib/mt-libuv/tcp.rb +2 -2
- data/lib/mt-libuv/version.rb +1 -1
- data/mt-libuv.gemspec +26 -26
- metadata +2089 -2
@@ -0,0 +1,1924 @@
|
|
1
|
+
|
2
|
+
/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
|
3
|
+
*
|
4
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
+
* of this software and associated documentation files (the "Software"), to
|
6
|
+
* deal in the Software without restriction, including without limitation the
|
7
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
8
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
9
|
+
* furnished to do so, subject to the following conditions:
|
10
|
+
*
|
11
|
+
* The above copyright notice and this permission notice shall be included in
|
12
|
+
* all copies or substantial portions of the Software.
|
13
|
+
*
|
14
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
19
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
20
|
+
* IN THE SOFTWARE.
|
21
|
+
*/
|
22
|
+
|
23
|
+
#include "uv.h"
|
24
|
+
#include "task.h"
|
25
|
+
#include <errno.h>
|
26
|
+
#include <fcntl.h>
|
27
|
+
#include <stdio.h>
|
28
|
+
#include <stdlib.h>
|
29
|
+
#include <string.h>
|
30
|
+
|
31
|
+
#ifdef _WIN32
|
32
|
+
# if defined(__MINGW32__)
|
33
|
+
# include <basetyps.h>
|
34
|
+
# endif
|
35
|
+
# include <shellapi.h>
|
36
|
+
# include <wchar.h>
|
37
|
+
#else
|
38
|
+
# include <unistd.h>
|
39
|
+
# include <sys/wait.h>
|
40
|
+
#endif
|
41
|
+
|
42
|
+
|
43
|
+
static int close_cb_called;
|
44
|
+
static int exit_cb_called;
|
45
|
+
static uv_process_t process;
|
46
|
+
static uv_timer_t timer;
|
47
|
+
static uv_process_options_t options;
|
48
|
+
static char exepath[1024];
|
49
|
+
static size_t exepath_size = 1024;
|
50
|
+
static char* args[5];
|
51
|
+
static int no_term_signal;
|
52
|
+
#ifndef _WIN32
|
53
|
+
static int timer_counter;
|
54
|
+
#endif
|
55
|
+
static uv_tcp_t tcp_server;
|
56
|
+
|
57
|
+
#define OUTPUT_SIZE 1024
|
58
|
+
static char output[OUTPUT_SIZE];
|
59
|
+
static int output_used;
|
60
|
+
|
61
|
+
|
62
|
+
static void close_cb(uv_handle_t* handle) {
|
63
|
+
printf("close_cb\n");
|
64
|
+
close_cb_called++;
|
65
|
+
}
|
66
|
+
|
67
|
+
static void exit_cb(uv_process_t* process,
|
68
|
+
int64_t exit_status,
|
69
|
+
int term_signal) {
|
70
|
+
printf("exit_cb\n");
|
71
|
+
exit_cb_called++;
|
72
|
+
ASSERT(exit_status == 1);
|
73
|
+
ASSERT(term_signal == 0);
|
74
|
+
uv_close((uv_handle_t*)process, close_cb);
|
75
|
+
}
|
76
|
+
|
77
|
+
|
78
|
+
static void fail_cb(uv_process_t* process,
|
79
|
+
int64_t exit_status,
|
80
|
+
int term_signal) {
|
81
|
+
ASSERT(0 && "fail_cb called");
|
82
|
+
}
|
83
|
+
|
84
|
+
|
85
|
+
static void kill_cb(uv_process_t* process,
|
86
|
+
int64_t exit_status,
|
87
|
+
int term_signal) {
|
88
|
+
int err;
|
89
|
+
|
90
|
+
printf("exit_cb\n");
|
91
|
+
exit_cb_called++;
|
92
|
+
#ifdef _WIN32
|
93
|
+
ASSERT(exit_status == 1);
|
94
|
+
#else
|
95
|
+
ASSERT(exit_status == 0);
|
96
|
+
#endif
|
97
|
+
#if defined(__APPLE__) || defined(__MVS__)
|
98
|
+
/*
|
99
|
+
* At least starting with Darwin Kernel Version 16.4.0, sending a SIGTERM to a
|
100
|
+
* process that is still starting up kills it with SIGKILL instead of SIGTERM.
|
101
|
+
* See: https://github.com/libuv/libuv/issues/1226
|
102
|
+
*/
|
103
|
+
ASSERT(no_term_signal || term_signal == SIGTERM || term_signal == SIGKILL);
|
104
|
+
#else
|
105
|
+
ASSERT(no_term_signal || term_signal == SIGTERM);
|
106
|
+
#endif
|
107
|
+
uv_close((uv_handle_t*)process, close_cb);
|
108
|
+
|
109
|
+
/*
|
110
|
+
* Sending signum == 0 should check if the
|
111
|
+
* child process is still alive, not kill it.
|
112
|
+
* This process should be dead.
|
113
|
+
*/
|
114
|
+
err = uv_kill(process->pid, 0);
|
115
|
+
ASSERT(err == UV_ESRCH);
|
116
|
+
}
|
117
|
+
|
118
|
+
static void detach_failure_cb(uv_process_t* process,
|
119
|
+
int64_t exit_status,
|
120
|
+
int term_signal) {
|
121
|
+
printf("detach_cb\n");
|
122
|
+
exit_cb_called++;
|
123
|
+
}
|
124
|
+
|
125
|
+
static void on_alloc(uv_handle_t* handle,
|
126
|
+
size_t suggested_size,
|
127
|
+
uv_buf_t* buf) {
|
128
|
+
buf->base = output + output_used;
|
129
|
+
buf->len = OUTPUT_SIZE - output_used;
|
130
|
+
}
|
131
|
+
|
132
|
+
|
133
|
+
static void on_read(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) {
|
134
|
+
if (nread > 0) {
|
135
|
+
output_used += nread;
|
136
|
+
} else if (nread < 0) {
|
137
|
+
ASSERT(nread == UV_EOF);
|
138
|
+
uv_close((uv_handle_t*)tcp, close_cb);
|
139
|
+
}
|
140
|
+
}
|
141
|
+
|
142
|
+
|
143
|
+
#ifndef _WIN32
|
144
|
+
static void on_read_once(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) {
|
145
|
+
uv_read_stop(tcp);
|
146
|
+
on_read(tcp, nread, buf);
|
147
|
+
}
|
148
|
+
#endif
|
149
|
+
|
150
|
+
|
151
|
+
static void write_cb(uv_write_t* req, int status) {
|
152
|
+
ASSERT(status == 0);
|
153
|
+
uv_close((uv_handle_t*)req->handle, close_cb);
|
154
|
+
}
|
155
|
+
|
156
|
+
|
157
|
+
static void init_process_options(char* test, uv_exit_cb exit_cb) {
|
158
|
+
/* Note spawn_helper1 defined in test/run-tests.c */
|
159
|
+
int r = uv_exepath(exepath, &exepath_size);
|
160
|
+
ASSERT(r == 0);
|
161
|
+
exepath[exepath_size] = '\0';
|
162
|
+
args[0] = exepath;
|
163
|
+
args[1] = test;
|
164
|
+
args[2] = NULL;
|
165
|
+
args[3] = NULL;
|
166
|
+
args[4] = NULL;
|
167
|
+
options.file = exepath;
|
168
|
+
options.args = args;
|
169
|
+
options.exit_cb = exit_cb;
|
170
|
+
options.flags = 0;
|
171
|
+
}
|
172
|
+
|
173
|
+
|
174
|
+
static void timer_cb(uv_timer_t* handle) {
|
175
|
+
uv_process_kill(&process, /* SIGTERM */ 15);
|
176
|
+
uv_close((uv_handle_t*)handle, close_cb);
|
177
|
+
}
|
178
|
+
|
179
|
+
|
180
|
+
#ifndef _WIN32
|
181
|
+
static void timer_counter_cb(uv_timer_t* handle) {
|
182
|
+
++timer_counter;
|
183
|
+
}
|
184
|
+
#endif
|
185
|
+
|
186
|
+
|
187
|
+
TEST_IMPL(spawn_fails) {
|
188
|
+
int r;
|
189
|
+
|
190
|
+
init_process_options("", fail_cb);
|
191
|
+
options.file = options.args[0] = "program-that-had-better-not-exist";
|
192
|
+
|
193
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
194
|
+
ASSERT(r == UV_ENOENT || r == UV_EACCES);
|
195
|
+
ASSERT(0 == uv_is_active((uv_handle_t*) &process));
|
196
|
+
uv_close((uv_handle_t*) &process, NULL);
|
197
|
+
ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
|
198
|
+
|
199
|
+
MAKE_VALGRIND_HAPPY();
|
200
|
+
return 0;
|
201
|
+
}
|
202
|
+
|
203
|
+
|
204
|
+
#ifndef _WIN32
|
205
|
+
TEST_IMPL(spawn_fails_check_for_waitpid_cleanup) {
|
206
|
+
int r;
|
207
|
+
int status;
|
208
|
+
int err;
|
209
|
+
|
210
|
+
init_process_options("", fail_cb);
|
211
|
+
options.file = options.args[0] = "program-that-had-better-not-exist";
|
212
|
+
|
213
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
214
|
+
ASSERT(r == UV_ENOENT || r == UV_EACCES);
|
215
|
+
ASSERT(0 == uv_is_active((uv_handle_t*) &process));
|
216
|
+
ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
|
217
|
+
|
218
|
+
/* verify the child is successfully cleaned up within libuv */
|
219
|
+
do
|
220
|
+
err = waitpid(process.pid, &status, 0);
|
221
|
+
while (err == -1 && errno == EINTR);
|
222
|
+
|
223
|
+
ASSERT(err == -1);
|
224
|
+
ASSERT(errno == ECHILD);
|
225
|
+
|
226
|
+
uv_close((uv_handle_t*) &process, NULL);
|
227
|
+
ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
|
228
|
+
|
229
|
+
MAKE_VALGRIND_HAPPY();
|
230
|
+
return 0;
|
231
|
+
}
|
232
|
+
#endif
|
233
|
+
|
234
|
+
|
235
|
+
TEST_IMPL(spawn_empty_env) {
|
236
|
+
char* env[1];
|
237
|
+
|
238
|
+
/* The autotools dynamic library build requires the presence of
|
239
|
+
* DYLD_LIBARY_PATH (macOS) or LD_LIBRARY_PATH (other Unices)
|
240
|
+
* in the environment, but of course that doesn't work with
|
241
|
+
* the empty environment that we're testing here.
|
242
|
+
*/
|
243
|
+
if (NULL != getenv("DYLD_LIBRARY_PATH") ||
|
244
|
+
NULL != getenv("LD_LIBRARY_PATH")) {
|
245
|
+
RETURN_SKIP("doesn't work with DYLD_LIBRARY_PATH/LD_LIBRARY_PATH");
|
246
|
+
}
|
247
|
+
|
248
|
+
init_process_options("spawn_helper1", exit_cb);
|
249
|
+
options.env = env;
|
250
|
+
env[0] = NULL;
|
251
|
+
|
252
|
+
ASSERT(0 == uv_spawn(uv_default_loop(), &process, &options));
|
253
|
+
ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
|
254
|
+
|
255
|
+
ASSERT(exit_cb_called == 1);
|
256
|
+
ASSERT(close_cb_called == 1);
|
257
|
+
|
258
|
+
MAKE_VALGRIND_HAPPY();
|
259
|
+
return 0;
|
260
|
+
}
|
261
|
+
|
262
|
+
|
263
|
+
TEST_IMPL(spawn_exit_code) {
|
264
|
+
int r;
|
265
|
+
|
266
|
+
init_process_options("spawn_helper1", exit_cb);
|
267
|
+
|
268
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
269
|
+
ASSERT(r == 0);
|
270
|
+
|
271
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
272
|
+
ASSERT(r == 0);
|
273
|
+
|
274
|
+
ASSERT(exit_cb_called == 1);
|
275
|
+
ASSERT(close_cb_called == 1);
|
276
|
+
|
277
|
+
MAKE_VALGRIND_HAPPY();
|
278
|
+
return 0;
|
279
|
+
}
|
280
|
+
|
281
|
+
|
282
|
+
TEST_IMPL(spawn_stdout) {
|
283
|
+
int r;
|
284
|
+
uv_pipe_t out;
|
285
|
+
uv_stdio_container_t stdio[2];
|
286
|
+
|
287
|
+
init_process_options("spawn_helper2", exit_cb);
|
288
|
+
|
289
|
+
uv_pipe_init(uv_default_loop(), &out, 0);
|
290
|
+
options.stdio = stdio;
|
291
|
+
options.stdio[0].flags = UV_IGNORE;
|
292
|
+
options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
|
293
|
+
options.stdio[1].data.stream = (uv_stream_t*)&out;
|
294
|
+
options.stdio_count = 2;
|
295
|
+
|
296
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
297
|
+
ASSERT(r == 0);
|
298
|
+
|
299
|
+
r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read);
|
300
|
+
ASSERT(r == 0);
|
301
|
+
|
302
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
303
|
+
ASSERT(r == 0);
|
304
|
+
|
305
|
+
ASSERT(exit_cb_called == 1);
|
306
|
+
ASSERT(close_cb_called == 2); /* Once for process once for the pipe. */
|
307
|
+
printf("output is: %s", output);
|
308
|
+
ASSERT(strcmp("hello world\n", output) == 0);
|
309
|
+
|
310
|
+
MAKE_VALGRIND_HAPPY();
|
311
|
+
return 0;
|
312
|
+
}
|
313
|
+
|
314
|
+
|
315
|
+
TEST_IMPL(spawn_stdout_to_file) {
|
316
|
+
int r;
|
317
|
+
uv_file file;
|
318
|
+
uv_fs_t fs_req;
|
319
|
+
uv_stdio_container_t stdio[2];
|
320
|
+
uv_buf_t buf;
|
321
|
+
|
322
|
+
/* Setup. */
|
323
|
+
unlink("stdout_file");
|
324
|
+
|
325
|
+
init_process_options("spawn_helper2", exit_cb);
|
326
|
+
|
327
|
+
r = uv_fs_open(NULL, &fs_req, "stdout_file", O_CREAT | O_RDWR,
|
328
|
+
S_IRUSR | S_IWUSR, NULL);
|
329
|
+
ASSERT(r != -1);
|
330
|
+
uv_fs_req_cleanup(&fs_req);
|
331
|
+
|
332
|
+
file = r;
|
333
|
+
|
334
|
+
options.stdio = stdio;
|
335
|
+
options.stdio[0].flags = UV_IGNORE;
|
336
|
+
options.stdio[1].flags = UV_INHERIT_FD;
|
337
|
+
options.stdio[1].data.fd = file;
|
338
|
+
options.stdio_count = 2;
|
339
|
+
|
340
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
341
|
+
ASSERT(r == 0);
|
342
|
+
|
343
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
344
|
+
ASSERT(r == 0);
|
345
|
+
|
346
|
+
ASSERT(exit_cb_called == 1);
|
347
|
+
ASSERT(close_cb_called == 1);
|
348
|
+
|
349
|
+
buf = uv_buf_init(output, sizeof(output));
|
350
|
+
r = uv_fs_read(NULL, &fs_req, file, &buf, 1, 0, NULL);
|
351
|
+
ASSERT(r == 12);
|
352
|
+
uv_fs_req_cleanup(&fs_req);
|
353
|
+
|
354
|
+
r = uv_fs_close(NULL, &fs_req, file, NULL);
|
355
|
+
ASSERT(r == 0);
|
356
|
+
uv_fs_req_cleanup(&fs_req);
|
357
|
+
|
358
|
+
printf("output is: %s", output);
|
359
|
+
ASSERT(strcmp("hello world\n", output) == 0);
|
360
|
+
|
361
|
+
/* Cleanup. */
|
362
|
+
unlink("stdout_file");
|
363
|
+
|
364
|
+
MAKE_VALGRIND_HAPPY();
|
365
|
+
return 0;
|
366
|
+
}
|
367
|
+
|
368
|
+
|
369
|
+
TEST_IMPL(spawn_stdout_and_stderr_to_file) {
|
370
|
+
int r;
|
371
|
+
uv_file file;
|
372
|
+
uv_fs_t fs_req;
|
373
|
+
uv_stdio_container_t stdio[3];
|
374
|
+
uv_buf_t buf;
|
375
|
+
|
376
|
+
/* Setup. */
|
377
|
+
unlink("stdout_file");
|
378
|
+
|
379
|
+
init_process_options("spawn_helper6", exit_cb);
|
380
|
+
|
381
|
+
r = uv_fs_open(NULL, &fs_req, "stdout_file", O_CREAT | O_RDWR,
|
382
|
+
S_IRUSR | S_IWUSR, NULL);
|
383
|
+
ASSERT(r != -1);
|
384
|
+
uv_fs_req_cleanup(&fs_req);
|
385
|
+
|
386
|
+
file = r;
|
387
|
+
|
388
|
+
options.stdio = stdio;
|
389
|
+
options.stdio[0].flags = UV_IGNORE;
|
390
|
+
options.stdio[1].flags = UV_INHERIT_FD;
|
391
|
+
options.stdio[1].data.fd = file;
|
392
|
+
options.stdio[2].flags = UV_INHERIT_FD;
|
393
|
+
options.stdio[2].data.fd = file;
|
394
|
+
options.stdio_count = 3;
|
395
|
+
|
396
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
397
|
+
ASSERT(r == 0);
|
398
|
+
|
399
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
400
|
+
ASSERT(r == 0);
|
401
|
+
|
402
|
+
ASSERT(exit_cb_called == 1);
|
403
|
+
ASSERT(close_cb_called == 1);
|
404
|
+
|
405
|
+
buf = uv_buf_init(output, sizeof(output));
|
406
|
+
r = uv_fs_read(NULL, &fs_req, file, &buf, 1, 0, NULL);
|
407
|
+
ASSERT(r == 27);
|
408
|
+
uv_fs_req_cleanup(&fs_req);
|
409
|
+
|
410
|
+
r = uv_fs_close(NULL, &fs_req, file, NULL);
|
411
|
+
ASSERT(r == 0);
|
412
|
+
uv_fs_req_cleanup(&fs_req);
|
413
|
+
|
414
|
+
printf("output is: %s", output);
|
415
|
+
ASSERT(strcmp("hello world\nhello errworld\n", output) == 0);
|
416
|
+
|
417
|
+
/* Cleanup. */
|
418
|
+
unlink("stdout_file");
|
419
|
+
|
420
|
+
MAKE_VALGRIND_HAPPY();
|
421
|
+
return 0;
|
422
|
+
}
|
423
|
+
|
424
|
+
|
425
|
+
TEST_IMPL(spawn_stdout_and_stderr_to_file2) {
|
426
|
+
#ifndef _WIN32
|
427
|
+
int r;
|
428
|
+
uv_file file;
|
429
|
+
uv_fs_t fs_req;
|
430
|
+
uv_stdio_container_t stdio[3];
|
431
|
+
uv_buf_t buf;
|
432
|
+
|
433
|
+
/* Setup. */
|
434
|
+
unlink("stdout_file");
|
435
|
+
|
436
|
+
init_process_options("spawn_helper6", exit_cb);
|
437
|
+
|
438
|
+
/* Replace stderr with our file */
|
439
|
+
r = uv_fs_open(NULL,
|
440
|
+
&fs_req,
|
441
|
+
"stdout_file",
|
442
|
+
O_CREAT | O_RDWR,
|
443
|
+
S_IRUSR | S_IWUSR,
|
444
|
+
NULL);
|
445
|
+
ASSERT(r != -1);
|
446
|
+
uv_fs_req_cleanup(&fs_req);
|
447
|
+
file = dup2(r, STDERR_FILENO);
|
448
|
+
ASSERT(file != -1);
|
449
|
+
|
450
|
+
options.stdio = stdio;
|
451
|
+
options.stdio[0].flags = UV_IGNORE;
|
452
|
+
options.stdio[1].flags = UV_INHERIT_FD;
|
453
|
+
options.stdio[1].data.fd = file;
|
454
|
+
options.stdio[2].flags = UV_INHERIT_FD;
|
455
|
+
options.stdio[2].data.fd = file;
|
456
|
+
options.stdio_count = 3;
|
457
|
+
|
458
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
459
|
+
ASSERT(r == 0);
|
460
|
+
|
461
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
462
|
+
ASSERT(r == 0);
|
463
|
+
|
464
|
+
ASSERT(exit_cb_called == 1);
|
465
|
+
ASSERT(close_cb_called == 1);
|
466
|
+
|
467
|
+
buf = uv_buf_init(output, sizeof(output));
|
468
|
+
r = uv_fs_read(NULL, &fs_req, file, &buf, 1, 0, NULL);
|
469
|
+
ASSERT(r == 27);
|
470
|
+
uv_fs_req_cleanup(&fs_req);
|
471
|
+
|
472
|
+
r = uv_fs_close(NULL, &fs_req, file, NULL);
|
473
|
+
ASSERT(r == 0);
|
474
|
+
uv_fs_req_cleanup(&fs_req);
|
475
|
+
|
476
|
+
printf("output is: %s", output);
|
477
|
+
ASSERT(strcmp("hello world\nhello errworld\n", output) == 0);
|
478
|
+
|
479
|
+
/* Cleanup. */
|
480
|
+
unlink("stdout_file");
|
481
|
+
|
482
|
+
MAKE_VALGRIND_HAPPY();
|
483
|
+
return 0;
|
484
|
+
#else
|
485
|
+
RETURN_SKIP("Unix only test");
|
486
|
+
#endif
|
487
|
+
}
|
488
|
+
|
489
|
+
|
490
|
+
TEST_IMPL(spawn_stdout_and_stderr_to_file_swap) {
|
491
|
+
#ifndef _WIN32
|
492
|
+
int r;
|
493
|
+
uv_file stdout_file;
|
494
|
+
uv_file stderr_file;
|
495
|
+
uv_fs_t fs_req;
|
496
|
+
uv_stdio_container_t stdio[3];
|
497
|
+
uv_buf_t buf;
|
498
|
+
|
499
|
+
/* Setup. */
|
500
|
+
unlink("stdout_file");
|
501
|
+
unlink("stderr_file");
|
502
|
+
|
503
|
+
init_process_options("spawn_helper6", exit_cb);
|
504
|
+
|
505
|
+
/* open 'stdout_file' and replace STDOUT_FILENO with it */
|
506
|
+
r = uv_fs_open(NULL,
|
507
|
+
&fs_req,
|
508
|
+
"stdout_file",
|
509
|
+
O_CREAT | O_RDWR,
|
510
|
+
S_IRUSR | S_IWUSR,
|
511
|
+
NULL);
|
512
|
+
ASSERT(r != -1);
|
513
|
+
uv_fs_req_cleanup(&fs_req);
|
514
|
+
stdout_file = dup2(r, STDOUT_FILENO);
|
515
|
+
ASSERT(stdout_file != -1);
|
516
|
+
|
517
|
+
/* open 'stderr_file' and replace STDERR_FILENO with it */
|
518
|
+
r = uv_fs_open(NULL, &fs_req, "stderr_file", O_CREAT | O_RDWR,
|
519
|
+
S_IRUSR | S_IWUSR, NULL);
|
520
|
+
ASSERT(r != -1);
|
521
|
+
uv_fs_req_cleanup(&fs_req);
|
522
|
+
stderr_file = dup2(r, STDERR_FILENO);
|
523
|
+
ASSERT(stderr_file != -1);
|
524
|
+
|
525
|
+
/* now we're going to swap them: the child process' stdout will be our
|
526
|
+
* stderr_file and vice versa */
|
527
|
+
options.stdio = stdio;
|
528
|
+
options.stdio[0].flags = UV_IGNORE;
|
529
|
+
options.stdio[1].flags = UV_INHERIT_FD;
|
530
|
+
options.stdio[1].data.fd = stderr_file;
|
531
|
+
options.stdio[2].flags = UV_INHERIT_FD;
|
532
|
+
options.stdio[2].data.fd = stdout_file;
|
533
|
+
options.stdio_count = 3;
|
534
|
+
|
535
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
536
|
+
ASSERT(r == 0);
|
537
|
+
|
538
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
539
|
+
ASSERT(r == 0);
|
540
|
+
|
541
|
+
ASSERT(exit_cb_called == 1);
|
542
|
+
ASSERT(close_cb_called == 1);
|
543
|
+
|
544
|
+
buf = uv_buf_init(output, sizeof(output));
|
545
|
+
|
546
|
+
/* check the content of stdout_file */
|
547
|
+
r = uv_fs_read(NULL, &fs_req, stdout_file, &buf, 1, 0, NULL);
|
548
|
+
ASSERT(r >= 15);
|
549
|
+
uv_fs_req_cleanup(&fs_req);
|
550
|
+
|
551
|
+
r = uv_fs_close(NULL, &fs_req, stdout_file, NULL);
|
552
|
+
ASSERT(r == 0);
|
553
|
+
uv_fs_req_cleanup(&fs_req);
|
554
|
+
|
555
|
+
printf("output is: %s", output);
|
556
|
+
ASSERT(strncmp("hello errworld\n", output, 15) == 0);
|
557
|
+
|
558
|
+
/* check the content of stderr_file */
|
559
|
+
r = uv_fs_read(NULL, &fs_req, stderr_file, &buf, 1, 0, NULL);
|
560
|
+
ASSERT(r >= 12);
|
561
|
+
uv_fs_req_cleanup(&fs_req);
|
562
|
+
|
563
|
+
r = uv_fs_close(NULL, &fs_req, stderr_file, NULL);
|
564
|
+
ASSERT(r == 0);
|
565
|
+
uv_fs_req_cleanup(&fs_req);
|
566
|
+
|
567
|
+
printf("output is: %s", output);
|
568
|
+
ASSERT(strncmp("hello world\n", output, 12) == 0);
|
569
|
+
|
570
|
+
/* Cleanup. */
|
571
|
+
unlink("stdout_file");
|
572
|
+
unlink("stderr_file");
|
573
|
+
|
574
|
+
MAKE_VALGRIND_HAPPY();
|
575
|
+
return 0;
|
576
|
+
#else
|
577
|
+
RETURN_SKIP("Unix only test");
|
578
|
+
#endif
|
579
|
+
}
|
580
|
+
|
581
|
+
|
582
|
+
TEST_IMPL(spawn_stdin) {
|
583
|
+
int r;
|
584
|
+
uv_pipe_t out;
|
585
|
+
uv_pipe_t in;
|
586
|
+
uv_write_t write_req;
|
587
|
+
uv_buf_t buf;
|
588
|
+
uv_stdio_container_t stdio[2];
|
589
|
+
char buffer[] = "hello-from-spawn_stdin";
|
590
|
+
|
591
|
+
init_process_options("spawn_helper3", exit_cb);
|
592
|
+
|
593
|
+
uv_pipe_init(uv_default_loop(), &out, 0);
|
594
|
+
uv_pipe_init(uv_default_loop(), &in, 0);
|
595
|
+
options.stdio = stdio;
|
596
|
+
options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE;
|
597
|
+
options.stdio[0].data.stream = (uv_stream_t*)∈
|
598
|
+
options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
|
599
|
+
options.stdio[1].data.stream = (uv_stream_t*)&out;
|
600
|
+
options.stdio_count = 2;
|
601
|
+
|
602
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
603
|
+
ASSERT(r == 0);
|
604
|
+
|
605
|
+
buf.base = buffer;
|
606
|
+
buf.len = sizeof(buffer);
|
607
|
+
r = uv_write(&write_req, (uv_stream_t*)&in, &buf, 1, write_cb);
|
608
|
+
ASSERT(r == 0);
|
609
|
+
|
610
|
+
r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read);
|
611
|
+
ASSERT(r == 0);
|
612
|
+
|
613
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
614
|
+
ASSERT(r == 0);
|
615
|
+
|
616
|
+
ASSERT(exit_cb_called == 1);
|
617
|
+
ASSERT(close_cb_called == 3); /* Once for process twice for the pipe. */
|
618
|
+
ASSERT(strcmp(buffer, output) == 0);
|
619
|
+
|
620
|
+
MAKE_VALGRIND_HAPPY();
|
621
|
+
return 0;
|
622
|
+
}
|
623
|
+
|
624
|
+
|
625
|
+
TEST_IMPL(spawn_stdio_greater_than_3) {
|
626
|
+
int r;
|
627
|
+
uv_pipe_t pipe;
|
628
|
+
uv_stdio_container_t stdio[4];
|
629
|
+
|
630
|
+
init_process_options("spawn_helper5", exit_cb);
|
631
|
+
|
632
|
+
uv_pipe_init(uv_default_loop(), &pipe, 0);
|
633
|
+
options.stdio = stdio;
|
634
|
+
options.stdio[0].flags = UV_IGNORE;
|
635
|
+
options.stdio[1].flags = UV_IGNORE;
|
636
|
+
options.stdio[2].flags = UV_IGNORE;
|
637
|
+
options.stdio[3].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
|
638
|
+
options.stdio[3].data.stream = (uv_stream_t*)&pipe;
|
639
|
+
options.stdio_count = 4;
|
640
|
+
|
641
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
642
|
+
ASSERT(r == 0);
|
643
|
+
|
644
|
+
r = uv_read_start((uv_stream_t*) &pipe, on_alloc, on_read);
|
645
|
+
ASSERT(r == 0);
|
646
|
+
|
647
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
648
|
+
ASSERT(r == 0);
|
649
|
+
|
650
|
+
ASSERT(exit_cb_called == 1);
|
651
|
+
ASSERT(close_cb_called == 2); /* Once for process once for the pipe. */
|
652
|
+
printf("output from stdio[3] is: %s", output);
|
653
|
+
ASSERT(strcmp("fourth stdio!\n", output) == 0);
|
654
|
+
|
655
|
+
MAKE_VALGRIND_HAPPY();
|
656
|
+
return 0;
|
657
|
+
}
|
658
|
+
|
659
|
+
|
660
|
+
int spawn_tcp_server_helper(void) {
|
661
|
+
uv_tcp_t tcp;
|
662
|
+
uv_os_sock_t handle;
|
663
|
+
int r;
|
664
|
+
|
665
|
+
r = uv_tcp_init(uv_default_loop(), &tcp);
|
666
|
+
ASSERT(r == 0);
|
667
|
+
|
668
|
+
#ifdef _WIN32
|
669
|
+
handle = _get_osfhandle(3);
|
670
|
+
#else
|
671
|
+
handle = 3;
|
672
|
+
#endif
|
673
|
+
r = uv_tcp_open(&tcp, handle);
|
674
|
+
ASSERT(r == 0);
|
675
|
+
|
676
|
+
/* Make sure that we can listen on a socket that was
|
677
|
+
* passed down from the parent process
|
678
|
+
*/
|
679
|
+
r = uv_listen((uv_stream_t*)&tcp, SOMAXCONN, NULL);
|
680
|
+
ASSERT(r == 0);
|
681
|
+
|
682
|
+
return 1;
|
683
|
+
}
|
684
|
+
|
685
|
+
|
686
|
+
TEST_IMPL(spawn_tcp_server) {
|
687
|
+
uv_stdio_container_t stdio[4];
|
688
|
+
struct sockaddr_in addr;
|
689
|
+
int fd;
|
690
|
+
int r;
|
691
|
+
#ifdef _WIN32
|
692
|
+
uv_os_fd_t handle;
|
693
|
+
#endif
|
694
|
+
|
695
|
+
init_process_options("spawn_tcp_server_helper", exit_cb);
|
696
|
+
|
697
|
+
ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
|
698
|
+
|
699
|
+
fd = -1;
|
700
|
+
r = uv_tcp_init_ex(uv_default_loop(), &tcp_server, AF_INET);
|
701
|
+
ASSERT(r == 0);
|
702
|
+
r = uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0);
|
703
|
+
ASSERT(r == 0);
|
704
|
+
#ifdef _WIN32
|
705
|
+
r = uv_fileno((uv_handle_t*)&tcp_server, &handle);
|
706
|
+
fd = _open_osfhandle((intptr_t) handle, 0);
|
707
|
+
#else
|
708
|
+
r = uv_fileno((uv_handle_t*)&tcp_server, &fd);
|
709
|
+
#endif
|
710
|
+
ASSERT(r == 0);
|
711
|
+
ASSERT(fd > 0);
|
712
|
+
|
713
|
+
options.stdio = stdio;
|
714
|
+
options.stdio[0].flags = UV_INHERIT_FD;
|
715
|
+
options.stdio[0].data.fd = 0;
|
716
|
+
options.stdio[1].flags = UV_INHERIT_FD;
|
717
|
+
options.stdio[1].data.fd = 1;
|
718
|
+
options.stdio[2].flags = UV_INHERIT_FD;
|
719
|
+
options.stdio[2].data.fd = 2;
|
720
|
+
options.stdio[3].flags = UV_INHERIT_FD;
|
721
|
+
options.stdio[3].data.fd = fd;
|
722
|
+
options.stdio_count = 4;
|
723
|
+
|
724
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
725
|
+
ASSERT(r == 0);
|
726
|
+
|
727
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
728
|
+
ASSERT(r == 0);
|
729
|
+
|
730
|
+
ASSERT(exit_cb_called == 1);
|
731
|
+
ASSERT(close_cb_called == 1);
|
732
|
+
|
733
|
+
MAKE_VALGRIND_HAPPY();
|
734
|
+
return 0;
|
735
|
+
}
|
736
|
+
|
737
|
+
|
738
|
+
TEST_IMPL(spawn_ignored_stdio) {
|
739
|
+
int r;
|
740
|
+
|
741
|
+
init_process_options("spawn_helper6", exit_cb);
|
742
|
+
|
743
|
+
options.stdio = NULL;
|
744
|
+
options.stdio_count = 0;
|
745
|
+
|
746
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
747
|
+
ASSERT(r == 0);
|
748
|
+
|
749
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
750
|
+
ASSERT(r == 0);
|
751
|
+
|
752
|
+
ASSERT(exit_cb_called == 1);
|
753
|
+
ASSERT(close_cb_called == 1);
|
754
|
+
|
755
|
+
MAKE_VALGRIND_HAPPY();
|
756
|
+
return 0;
|
757
|
+
}
|
758
|
+
|
759
|
+
|
760
|
+
TEST_IMPL(spawn_and_kill) {
|
761
|
+
int r;
|
762
|
+
|
763
|
+
init_process_options("spawn_helper4", kill_cb);
|
764
|
+
|
765
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
766
|
+
ASSERT(r == 0);
|
767
|
+
|
768
|
+
r = uv_timer_init(uv_default_loop(), &timer);
|
769
|
+
ASSERT(r == 0);
|
770
|
+
|
771
|
+
r = uv_timer_start(&timer, timer_cb, 500, 0);
|
772
|
+
ASSERT(r == 0);
|
773
|
+
|
774
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
775
|
+
ASSERT(r == 0);
|
776
|
+
|
777
|
+
ASSERT(exit_cb_called == 1);
|
778
|
+
ASSERT(close_cb_called == 2); /* Once for process and once for timer. */
|
779
|
+
|
780
|
+
MAKE_VALGRIND_HAPPY();
|
781
|
+
return 0;
|
782
|
+
}
|
783
|
+
|
784
|
+
|
785
|
+
TEST_IMPL(spawn_preserve_env) {
|
786
|
+
int r;
|
787
|
+
uv_pipe_t out;
|
788
|
+
uv_stdio_container_t stdio[2];
|
789
|
+
|
790
|
+
init_process_options("spawn_helper7", exit_cb);
|
791
|
+
|
792
|
+
uv_pipe_init(uv_default_loop(), &out, 0);
|
793
|
+
options.stdio = stdio;
|
794
|
+
options.stdio[0].flags = UV_IGNORE;
|
795
|
+
options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
|
796
|
+
options.stdio[1].data.stream = (uv_stream_t*) &out;
|
797
|
+
options.stdio_count = 2;
|
798
|
+
|
799
|
+
r = putenv("ENV_TEST=testval");
|
800
|
+
ASSERT(r == 0);
|
801
|
+
|
802
|
+
/* Explicitly set options.env to NULL to test for env clobbering. */
|
803
|
+
options.env = NULL;
|
804
|
+
|
805
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
806
|
+
ASSERT(r == 0);
|
807
|
+
|
808
|
+
r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read);
|
809
|
+
ASSERT(r == 0);
|
810
|
+
|
811
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
812
|
+
ASSERT(r == 0);
|
813
|
+
|
814
|
+
ASSERT(exit_cb_called == 1);
|
815
|
+
ASSERT(close_cb_called == 2);
|
816
|
+
|
817
|
+
printf("output is: %s", output);
|
818
|
+
ASSERT(strcmp("testval", output) == 0);
|
819
|
+
|
820
|
+
MAKE_VALGRIND_HAPPY();
|
821
|
+
return 0;
|
822
|
+
}
|
823
|
+
|
824
|
+
|
825
|
+
TEST_IMPL(spawn_detached) {
|
826
|
+
int r;
|
827
|
+
|
828
|
+
init_process_options("spawn_helper4", detach_failure_cb);
|
829
|
+
|
830
|
+
options.flags |= UV_PROCESS_DETACHED;
|
831
|
+
|
832
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
833
|
+
ASSERT(r == 0);
|
834
|
+
|
835
|
+
uv_unref((uv_handle_t*)&process);
|
836
|
+
|
837
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
838
|
+
ASSERT(r == 0);
|
839
|
+
|
840
|
+
ASSERT(exit_cb_called == 0);
|
841
|
+
|
842
|
+
ASSERT(process.pid == uv_process_get_pid(&process));
|
843
|
+
|
844
|
+
r = uv_kill(process.pid, 0);
|
845
|
+
ASSERT(r == 0);
|
846
|
+
|
847
|
+
r = uv_kill(process.pid, 15);
|
848
|
+
ASSERT(r == 0);
|
849
|
+
|
850
|
+
MAKE_VALGRIND_HAPPY();
|
851
|
+
return 0;
|
852
|
+
}
|
853
|
+
|
854
|
+
TEST_IMPL(spawn_and_kill_with_std) {
|
855
|
+
int r;
|
856
|
+
uv_pipe_t in, out, err;
|
857
|
+
uv_write_t write;
|
858
|
+
char message[] = "Nancy's joining me because the message this evening is "
|
859
|
+
"not my message but ours.";
|
860
|
+
uv_buf_t buf;
|
861
|
+
uv_stdio_container_t stdio[3];
|
862
|
+
|
863
|
+
init_process_options("spawn_helper4", kill_cb);
|
864
|
+
|
865
|
+
r = uv_pipe_init(uv_default_loop(), &in, 0);
|
866
|
+
ASSERT(r == 0);
|
867
|
+
|
868
|
+
r = uv_pipe_init(uv_default_loop(), &out, 0);
|
869
|
+
ASSERT(r == 0);
|
870
|
+
|
871
|
+
r = uv_pipe_init(uv_default_loop(), &err, 0);
|
872
|
+
ASSERT(r == 0);
|
873
|
+
|
874
|
+
options.stdio = stdio;
|
875
|
+
options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE;
|
876
|
+
options.stdio[0].data.stream = (uv_stream_t*)∈
|
877
|
+
options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
|
878
|
+
options.stdio[1].data.stream = (uv_stream_t*)&out;
|
879
|
+
options.stdio[2].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
|
880
|
+
options.stdio[2].data.stream = (uv_stream_t*)&err;
|
881
|
+
options.stdio_count = 3;
|
882
|
+
|
883
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
884
|
+
ASSERT(r == 0);
|
885
|
+
|
886
|
+
buf = uv_buf_init(message, sizeof message);
|
887
|
+
r = uv_write(&write, (uv_stream_t*) &in, &buf, 1, write_cb);
|
888
|
+
ASSERT(r == 0);
|
889
|
+
|
890
|
+
r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read);
|
891
|
+
ASSERT(r == 0);
|
892
|
+
|
893
|
+
r = uv_read_start((uv_stream_t*) &err, on_alloc, on_read);
|
894
|
+
ASSERT(r == 0);
|
895
|
+
|
896
|
+
r = uv_timer_init(uv_default_loop(), &timer);
|
897
|
+
ASSERT(r == 0);
|
898
|
+
|
899
|
+
r = uv_timer_start(&timer, timer_cb, 500, 0);
|
900
|
+
ASSERT(r == 0);
|
901
|
+
|
902
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
903
|
+
ASSERT(r == 0);
|
904
|
+
|
905
|
+
ASSERT(exit_cb_called == 1);
|
906
|
+
ASSERT(close_cb_called == 5); /* process x 1, timer x 1, stdio x 3. */
|
907
|
+
|
908
|
+
MAKE_VALGRIND_HAPPY();
|
909
|
+
return 0;
|
910
|
+
}
|
911
|
+
|
912
|
+
|
913
|
+
TEST_IMPL(spawn_and_ping) {
|
914
|
+
uv_write_t write_req;
|
915
|
+
uv_pipe_t in, out;
|
916
|
+
uv_buf_t buf;
|
917
|
+
uv_stdio_container_t stdio[2];
|
918
|
+
int r;
|
919
|
+
|
920
|
+
init_process_options("spawn_helper3", exit_cb);
|
921
|
+
buf = uv_buf_init("TEST", 4);
|
922
|
+
|
923
|
+
uv_pipe_init(uv_default_loop(), &out, 0);
|
924
|
+
uv_pipe_init(uv_default_loop(), &in, 0);
|
925
|
+
options.stdio = stdio;
|
926
|
+
options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE;
|
927
|
+
options.stdio[0].data.stream = (uv_stream_t*)∈
|
928
|
+
options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
|
929
|
+
options.stdio[1].data.stream = (uv_stream_t*)&out;
|
930
|
+
options.stdio_count = 2;
|
931
|
+
|
932
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
933
|
+
ASSERT(r == 0);
|
934
|
+
|
935
|
+
/* Sending signum == 0 should check if the
|
936
|
+
* child process is still alive, not kill it.
|
937
|
+
*/
|
938
|
+
r = uv_process_kill(&process, 0);
|
939
|
+
ASSERT(r == 0);
|
940
|
+
|
941
|
+
r = uv_write(&write_req, (uv_stream_t*)&in, &buf, 1, write_cb);
|
942
|
+
ASSERT(r == 0);
|
943
|
+
|
944
|
+
r = uv_read_start((uv_stream_t*)&out, on_alloc, on_read);
|
945
|
+
ASSERT(r == 0);
|
946
|
+
|
947
|
+
ASSERT(exit_cb_called == 0);
|
948
|
+
|
949
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
950
|
+
ASSERT(r == 0);
|
951
|
+
|
952
|
+
ASSERT(exit_cb_called == 1);
|
953
|
+
ASSERT(strcmp(output, "TEST") == 0);
|
954
|
+
|
955
|
+
MAKE_VALGRIND_HAPPY();
|
956
|
+
return 0;
|
957
|
+
}
|
958
|
+
|
959
|
+
|
960
|
+
TEST_IMPL(spawn_same_stdout_stderr) {
|
961
|
+
uv_write_t write_req;
|
962
|
+
uv_pipe_t in, out;
|
963
|
+
uv_buf_t buf;
|
964
|
+
uv_stdio_container_t stdio[3];
|
965
|
+
int r;
|
966
|
+
|
967
|
+
init_process_options("spawn_helper3", exit_cb);
|
968
|
+
buf = uv_buf_init("TEST", 4);
|
969
|
+
|
970
|
+
uv_pipe_init(uv_default_loop(), &out, 0);
|
971
|
+
uv_pipe_init(uv_default_loop(), &in, 0);
|
972
|
+
options.stdio = stdio;
|
973
|
+
options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE;
|
974
|
+
options.stdio[0].data.stream = (uv_stream_t*)∈
|
975
|
+
options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
|
976
|
+
options.stdio[1].data.stream = (uv_stream_t*)&out;
|
977
|
+
options.stdio_count = 2;
|
978
|
+
|
979
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
980
|
+
ASSERT(r == 0);
|
981
|
+
|
982
|
+
/* Sending signum == 0 should check if the
|
983
|
+
* child process is still alive, not kill it.
|
984
|
+
*/
|
985
|
+
r = uv_process_kill(&process, 0);
|
986
|
+
ASSERT(r == 0);
|
987
|
+
|
988
|
+
r = uv_write(&write_req, (uv_stream_t*)&in, &buf, 1, write_cb);
|
989
|
+
ASSERT(r == 0);
|
990
|
+
|
991
|
+
r = uv_read_start((uv_stream_t*)&out, on_alloc, on_read);
|
992
|
+
ASSERT(r == 0);
|
993
|
+
|
994
|
+
ASSERT(exit_cb_called == 0);
|
995
|
+
|
996
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
997
|
+
ASSERT(r == 0);
|
998
|
+
|
999
|
+
ASSERT(exit_cb_called == 1);
|
1000
|
+
ASSERT(strcmp(output, "TEST") == 0);
|
1001
|
+
|
1002
|
+
MAKE_VALGRIND_HAPPY();
|
1003
|
+
return 0;
|
1004
|
+
}
|
1005
|
+
|
1006
|
+
|
1007
|
+
TEST_IMPL(spawn_closed_process_io) {
|
1008
|
+
uv_pipe_t in;
|
1009
|
+
uv_write_t write_req;
|
1010
|
+
uv_buf_t buf;
|
1011
|
+
uv_stdio_container_t stdio[2];
|
1012
|
+
static char buffer[] = "hello-from-spawn_stdin\n";
|
1013
|
+
|
1014
|
+
init_process_options("spawn_helper3", exit_cb);
|
1015
|
+
|
1016
|
+
uv_pipe_init(uv_default_loop(), &in, 0);
|
1017
|
+
options.stdio = stdio;
|
1018
|
+
options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE;
|
1019
|
+
options.stdio[0].data.stream = (uv_stream_t*) ∈
|
1020
|
+
options.stdio_count = 1;
|
1021
|
+
|
1022
|
+
close(0); /* Close process stdin. */
|
1023
|
+
|
1024
|
+
ASSERT(0 == uv_spawn(uv_default_loop(), &process, &options));
|
1025
|
+
|
1026
|
+
buf = uv_buf_init(buffer, sizeof(buffer));
|
1027
|
+
ASSERT(0 == uv_write(&write_req, (uv_stream_t*) &in, &buf, 1, write_cb));
|
1028
|
+
|
1029
|
+
ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
|
1030
|
+
|
1031
|
+
ASSERT(exit_cb_called == 1);
|
1032
|
+
ASSERT(close_cb_called == 2); /* process, child stdin */
|
1033
|
+
|
1034
|
+
MAKE_VALGRIND_HAPPY();
|
1035
|
+
return 0;
|
1036
|
+
}
|
1037
|
+
|
1038
|
+
|
1039
|
+
TEST_IMPL(kill) {
|
1040
|
+
int r;
|
1041
|
+
|
1042
|
+
#ifdef _WIN32
|
1043
|
+
no_term_signal = 1;
|
1044
|
+
#endif
|
1045
|
+
|
1046
|
+
init_process_options("spawn_helper4", kill_cb);
|
1047
|
+
|
1048
|
+
/* Verify that uv_spawn() resets the signal disposition. */
|
1049
|
+
#ifndef _WIN32
|
1050
|
+
{
|
1051
|
+
sigset_t set;
|
1052
|
+
sigemptyset(&set);
|
1053
|
+
sigaddset(&set, SIGTERM);
|
1054
|
+
ASSERT(0 == pthread_sigmask(SIG_BLOCK, &set, NULL));
|
1055
|
+
}
|
1056
|
+
ASSERT(SIG_ERR != signal(SIGTERM, SIG_IGN));
|
1057
|
+
#endif
|
1058
|
+
|
1059
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
1060
|
+
ASSERT(r == 0);
|
1061
|
+
|
1062
|
+
#ifndef _WIN32
|
1063
|
+
{
|
1064
|
+
sigset_t set;
|
1065
|
+
sigemptyset(&set);
|
1066
|
+
sigaddset(&set, SIGTERM);
|
1067
|
+
ASSERT(0 == pthread_sigmask(SIG_UNBLOCK, &set, NULL));
|
1068
|
+
}
|
1069
|
+
ASSERT(SIG_ERR != signal(SIGTERM, SIG_DFL));
|
1070
|
+
#endif
|
1071
|
+
|
1072
|
+
/* Sending signum == 0 should check if the
|
1073
|
+
* child process is still alive, not kill it.
|
1074
|
+
*/
|
1075
|
+
r = uv_kill(process.pid, 0);
|
1076
|
+
ASSERT(r == 0);
|
1077
|
+
|
1078
|
+
/* Kill the process. */
|
1079
|
+
r = uv_kill(process.pid, /* SIGTERM */ 15);
|
1080
|
+
ASSERT(r == 0);
|
1081
|
+
|
1082
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
1083
|
+
ASSERT(r == 0);
|
1084
|
+
|
1085
|
+
ASSERT(exit_cb_called == 1);
|
1086
|
+
ASSERT(close_cb_called == 1);
|
1087
|
+
|
1088
|
+
MAKE_VALGRIND_HAPPY();
|
1089
|
+
return 0;
|
1090
|
+
}
|
1091
|
+
|
1092
|
+
|
1093
|
+
#ifdef _WIN32
|
1094
|
+
TEST_IMPL(spawn_detect_pipe_name_collisions_on_windows) {
|
1095
|
+
int r;
|
1096
|
+
uv_pipe_t out;
|
1097
|
+
char name[64];
|
1098
|
+
HANDLE pipe_handle;
|
1099
|
+
uv_stdio_container_t stdio[2];
|
1100
|
+
|
1101
|
+
init_process_options("spawn_helper2", exit_cb);
|
1102
|
+
|
1103
|
+
uv_pipe_init(uv_default_loop(), &out, 0);
|
1104
|
+
options.stdio = stdio;
|
1105
|
+
options.stdio[0].flags = UV_IGNORE;
|
1106
|
+
options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
|
1107
|
+
options.stdio[1].data.stream = (uv_stream_t*)&out;
|
1108
|
+
options.stdio_count = 2;
|
1109
|
+
|
1110
|
+
/* Create a pipe that'll cause a collision. */
|
1111
|
+
snprintf(name,
|
1112
|
+
sizeof(name),
|
1113
|
+
"\\\\.\\pipe\\uv\\%p-%d",
|
1114
|
+
&out,
|
1115
|
+
GetCurrentProcessId());
|
1116
|
+
pipe_handle = CreateNamedPipeA(name,
|
1117
|
+
PIPE_ACCESS_INBOUND | FILE_FLAG_OVERLAPPED,
|
1118
|
+
PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT,
|
1119
|
+
10,
|
1120
|
+
65536,
|
1121
|
+
65536,
|
1122
|
+
0,
|
1123
|
+
NULL);
|
1124
|
+
ASSERT(pipe_handle != INVALID_HANDLE_VALUE);
|
1125
|
+
|
1126
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
1127
|
+
ASSERT(r == 0);
|
1128
|
+
|
1129
|
+
r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read);
|
1130
|
+
ASSERT(r == 0);
|
1131
|
+
|
1132
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
1133
|
+
ASSERT(r == 0);
|
1134
|
+
|
1135
|
+
ASSERT(exit_cb_called == 1);
|
1136
|
+
ASSERT(close_cb_called == 2); /* Once for process once for the pipe. */
|
1137
|
+
printf("output is: %s", output);
|
1138
|
+
ASSERT(strcmp("hello world\n", output) == 0);
|
1139
|
+
|
1140
|
+
MAKE_VALGRIND_HAPPY();
|
1141
|
+
return 0;
|
1142
|
+
}
|
1143
|
+
|
1144
|
+
|
1145
|
+
#if !defined(USING_UV_SHARED)
|
1146
|
+
int make_program_args(char** args, int verbatim_arguments, WCHAR** dst_ptr);
|
1147
|
+
WCHAR* quote_cmd_arg(const WCHAR *source, WCHAR *target);
|
1148
|
+
|
1149
|
+
TEST_IMPL(argument_escaping) {
|
1150
|
+
const WCHAR* test_str[] = {
|
1151
|
+
L"",
|
1152
|
+
L"HelloWorld",
|
1153
|
+
L"Hello World",
|
1154
|
+
L"Hello\"World",
|
1155
|
+
L"Hello World\\",
|
1156
|
+
L"Hello\\\"World",
|
1157
|
+
L"Hello\\World",
|
1158
|
+
L"Hello\\\\World",
|
1159
|
+
L"Hello World\\",
|
1160
|
+
L"c:\\path\\to\\node.exe --eval \"require('c:\\\\path\\\\to\\\\test.js')\""
|
1161
|
+
};
|
1162
|
+
const int count = sizeof(test_str) / sizeof(*test_str);
|
1163
|
+
WCHAR** test_output;
|
1164
|
+
WCHAR* command_line;
|
1165
|
+
WCHAR** cracked;
|
1166
|
+
size_t total_size = 0;
|
1167
|
+
int i;
|
1168
|
+
int num_args;
|
1169
|
+
int result;
|
1170
|
+
|
1171
|
+
char* verbatim[] = {
|
1172
|
+
"cmd.exe",
|
1173
|
+
"/c",
|
1174
|
+
"c:\\path\\to\\node.exe --eval \"require('c:\\\\path\\\\to\\\\test.js')\"",
|
1175
|
+
NULL
|
1176
|
+
};
|
1177
|
+
WCHAR* verbatim_output;
|
1178
|
+
WCHAR* non_verbatim_output;
|
1179
|
+
|
1180
|
+
test_output = calloc(count, sizeof(WCHAR*));
|
1181
|
+
ASSERT(test_output != NULL);
|
1182
|
+
for (i = 0; i < count; ++i) {
|
1183
|
+
test_output[i] = calloc(2 * (wcslen(test_str[i]) + 2), sizeof(WCHAR));
|
1184
|
+
quote_cmd_arg(test_str[i], test_output[i]);
|
1185
|
+
wprintf(L"input : %s\n", test_str[i]);
|
1186
|
+
wprintf(L"output: %s\n", test_output[i]);
|
1187
|
+
total_size += wcslen(test_output[i]) + 1;
|
1188
|
+
}
|
1189
|
+
command_line = calloc(total_size + 1, sizeof(WCHAR));
|
1190
|
+
ASSERT(command_line != NULL);
|
1191
|
+
for (i = 0; i < count; ++i) {
|
1192
|
+
wcscat(command_line, test_output[i]);
|
1193
|
+
wcscat(command_line, L" ");
|
1194
|
+
}
|
1195
|
+
command_line[total_size - 1] = L'\0';
|
1196
|
+
|
1197
|
+
wprintf(L"command_line: %s\n", command_line);
|
1198
|
+
|
1199
|
+
cracked = CommandLineToArgvW(command_line, &num_args);
|
1200
|
+
for (i = 0; i < num_args; ++i) {
|
1201
|
+
wprintf(L"%d: %s\t%s\n", i, test_str[i], cracked[i]);
|
1202
|
+
ASSERT(wcscmp(test_str[i], cracked[i]) == 0);
|
1203
|
+
}
|
1204
|
+
|
1205
|
+
LocalFree(cracked);
|
1206
|
+
for (i = 0; i < count; ++i) {
|
1207
|
+
free(test_output[i]);
|
1208
|
+
}
|
1209
|
+
free(test_output);
|
1210
|
+
|
1211
|
+
result = make_program_args(verbatim, 1, &verbatim_output);
|
1212
|
+
ASSERT(result == 0);
|
1213
|
+
result = make_program_args(verbatim, 0, &non_verbatim_output);
|
1214
|
+
ASSERT(result == 0);
|
1215
|
+
|
1216
|
+
wprintf(L" verbatim_output: %s\n", verbatim_output);
|
1217
|
+
wprintf(L"non_verbatim_output: %s\n", non_verbatim_output);
|
1218
|
+
|
1219
|
+
ASSERT(wcscmp(verbatim_output,
|
1220
|
+
L"cmd.exe /c c:\\path\\to\\node.exe --eval "
|
1221
|
+
L"\"require('c:\\\\path\\\\to\\\\test.js')\"") == 0);
|
1222
|
+
ASSERT(wcscmp(non_verbatim_output,
|
1223
|
+
L"cmd.exe /c \"c:\\path\\to\\node.exe --eval "
|
1224
|
+
L"\\\"require('c:\\\\path\\\\to\\\\test.js')\\\"\"") == 0);
|
1225
|
+
|
1226
|
+
free(verbatim_output);
|
1227
|
+
free(non_verbatim_output);
|
1228
|
+
|
1229
|
+
return 0;
|
1230
|
+
}
|
1231
|
+
|
1232
|
+
int make_program_env(char** env_block, WCHAR** dst_ptr);
|
1233
|
+
|
1234
|
+
TEST_IMPL(environment_creation) {
|
1235
|
+
size_t i;
|
1236
|
+
char* environment[] = {
|
1237
|
+
"FOO=BAR",
|
1238
|
+
"SYSTEM=ROOT", /* substring of a supplied var name */
|
1239
|
+
"SYSTEMROOTED=OMG", /* supplied var name is a substring */
|
1240
|
+
"TEMP=C:\\Temp",
|
1241
|
+
"INVALID",
|
1242
|
+
"BAZ=QUX",
|
1243
|
+
"B_Z=QUX",
|
1244
|
+
"B\xe2\x82\xacZ=QUX",
|
1245
|
+
"B\xf0\x90\x80\x82Z=QUX",
|
1246
|
+
"B\xef\xbd\xa1Z=QUX",
|
1247
|
+
"B\xf0\xa3\x91\x96Z=QUX",
|
1248
|
+
"BAZ", /* repeat, invalid variable */
|
1249
|
+
NULL
|
1250
|
+
};
|
1251
|
+
WCHAR* wenvironment[] = {
|
1252
|
+
L"BAZ=QUX",
|
1253
|
+
L"B_Z=QUX",
|
1254
|
+
L"B\x20acZ=QUX",
|
1255
|
+
L"B\xd800\xdc02Z=QUX",
|
1256
|
+
L"B\xd84d\xdc56Z=QUX",
|
1257
|
+
L"B\xff61Z=QUX",
|
1258
|
+
L"FOO=BAR",
|
1259
|
+
L"SYSTEM=ROOT", /* substring of a supplied var name */
|
1260
|
+
L"SYSTEMROOTED=OMG", /* supplied var name is a substring */
|
1261
|
+
L"TEMP=C:\\Temp",
|
1262
|
+
};
|
1263
|
+
WCHAR* from_env[] = {
|
1264
|
+
/* list should be kept in sync with list
|
1265
|
+
* in process.c, minus variables in wenvironment */
|
1266
|
+
L"HOMEDRIVE",
|
1267
|
+
L"HOMEPATH",
|
1268
|
+
L"LOGONSERVER",
|
1269
|
+
L"PATH",
|
1270
|
+
L"USERDOMAIN",
|
1271
|
+
L"USERNAME",
|
1272
|
+
L"USERPROFILE",
|
1273
|
+
L"SYSTEMDRIVE",
|
1274
|
+
L"SYSTEMROOT",
|
1275
|
+
L"WINDIR",
|
1276
|
+
/* test for behavior in the absence of a
|
1277
|
+
* required-environment variable: */
|
1278
|
+
L"ZTHIS_ENV_VARIABLE_DOES_NOT_EXIST",
|
1279
|
+
};
|
1280
|
+
int found_in_loc_env[ARRAY_SIZE(wenvironment)] = {0};
|
1281
|
+
int found_in_usr_env[ARRAY_SIZE(from_env)] = {0};
|
1282
|
+
WCHAR *expected[ARRAY_SIZE(from_env)];
|
1283
|
+
int result;
|
1284
|
+
WCHAR* str;
|
1285
|
+
WCHAR* prev;
|
1286
|
+
WCHAR* env;
|
1287
|
+
|
1288
|
+
for (i = 0; i < ARRAY_SIZE(from_env); i++) {
|
1289
|
+
/* copy expected additions to environment locally */
|
1290
|
+
size_t len = GetEnvironmentVariableW(from_env[i], NULL, 0);
|
1291
|
+
if (len == 0) {
|
1292
|
+
found_in_usr_env[i] = 1;
|
1293
|
+
str = malloc(1 * sizeof(WCHAR));
|
1294
|
+
*str = 0;
|
1295
|
+
expected[i] = str;
|
1296
|
+
} else {
|
1297
|
+
size_t name_len = wcslen(from_env[i]);
|
1298
|
+
str = malloc((name_len+1+len) * sizeof(WCHAR));
|
1299
|
+
wmemcpy(str, from_env[i], name_len);
|
1300
|
+
expected[i] = str;
|
1301
|
+
str += name_len;
|
1302
|
+
*str++ = L'=';
|
1303
|
+
GetEnvironmentVariableW(from_env[i], str, len);
|
1304
|
+
}
|
1305
|
+
}
|
1306
|
+
|
1307
|
+
result = make_program_env(environment, &env);
|
1308
|
+
ASSERT(result == 0);
|
1309
|
+
|
1310
|
+
for (str = env, prev = NULL; *str; prev = str, str += wcslen(str) + 1) {
|
1311
|
+
int found = 0;
|
1312
|
+
#if 0
|
1313
|
+
_cputws(str);
|
1314
|
+
putchar('\n');
|
1315
|
+
#endif
|
1316
|
+
for (i = 0; i < ARRAY_SIZE(wenvironment) && !found; i++) {
|
1317
|
+
if (!wcscmp(str, wenvironment[i])) {
|
1318
|
+
ASSERT(!found_in_loc_env[i]);
|
1319
|
+
found_in_loc_env[i] = 1;
|
1320
|
+
found = 1;
|
1321
|
+
}
|
1322
|
+
}
|
1323
|
+
for (i = 0; i < ARRAY_SIZE(expected) && !found; i++) {
|
1324
|
+
if (!wcscmp(str, expected[i])) {
|
1325
|
+
ASSERT(!found_in_usr_env[i]);
|
1326
|
+
found_in_usr_env[i] = 1;
|
1327
|
+
found = 1;
|
1328
|
+
}
|
1329
|
+
}
|
1330
|
+
if (prev) { /* verify sort order -- requires Vista */
|
1331
|
+
#if _WIN32_WINNT >= 0x0600 && \
|
1332
|
+
(!defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR))
|
1333
|
+
ASSERT(CompareStringOrdinal(prev, -1, str, -1, TRUE) == 1);
|
1334
|
+
#endif
|
1335
|
+
}
|
1336
|
+
ASSERT(found); /* verify that we expected this variable */
|
1337
|
+
}
|
1338
|
+
|
1339
|
+
/* verify that we found all expected variables */
|
1340
|
+
for (i = 0; i < ARRAY_SIZE(wenvironment); i++) {
|
1341
|
+
ASSERT(found_in_loc_env[i]);
|
1342
|
+
}
|
1343
|
+
for (i = 0; i < ARRAY_SIZE(expected); i++) {
|
1344
|
+
ASSERT(found_in_usr_env[i]);
|
1345
|
+
}
|
1346
|
+
|
1347
|
+
return 0;
|
1348
|
+
}
|
1349
|
+
#endif
|
1350
|
+
|
1351
|
+
/* Regression test for issue #909 */
|
1352
|
+
TEST_IMPL(spawn_with_an_odd_path) {
|
1353
|
+
int r;
|
1354
|
+
|
1355
|
+
char newpath[2048];
|
1356
|
+
char *path = getenv("PATH");
|
1357
|
+
ASSERT(path != NULL);
|
1358
|
+
snprintf(newpath, 2048, ";.;%s", path);
|
1359
|
+
SetEnvironmentVariable("PATH", newpath);
|
1360
|
+
|
1361
|
+
init_process_options("", exit_cb);
|
1362
|
+
options.file = options.args[0] = "program-that-had-better-not-exist";
|
1363
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
1364
|
+
ASSERT(r == UV_ENOENT || r == UV_EACCES);
|
1365
|
+
ASSERT(0 == uv_is_active((uv_handle_t*) &process));
|
1366
|
+
uv_close((uv_handle_t*) &process, NULL);
|
1367
|
+
ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
|
1368
|
+
|
1369
|
+
MAKE_VALGRIND_HAPPY();
|
1370
|
+
return 0;
|
1371
|
+
}
|
1372
|
+
#endif
|
1373
|
+
|
1374
|
+
#ifndef _WIN32
|
1375
|
+
TEST_IMPL(spawn_setuid_setgid) {
|
1376
|
+
int r;
|
1377
|
+
struct passwd* pw;
|
1378
|
+
char uidstr[10];
|
1379
|
+
char gidstr[10];
|
1380
|
+
|
1381
|
+
/* if not root, then this will fail. */
|
1382
|
+
uv_uid_t uid = getuid();
|
1383
|
+
if (uid != 0) {
|
1384
|
+
RETURN_SKIP("It should be run as root user");
|
1385
|
+
}
|
1386
|
+
|
1387
|
+
init_process_options("spawn_helper_setuid_setgid", exit_cb);
|
1388
|
+
|
1389
|
+
/* become the "nobody" user. */
|
1390
|
+
pw = getpwnam("nobody");
|
1391
|
+
ASSERT(pw != NULL);
|
1392
|
+
options.uid = pw->pw_uid;
|
1393
|
+
options.gid = pw->pw_gid;
|
1394
|
+
snprintf(uidstr, sizeof(uidstr), "%d", pw->pw_uid);
|
1395
|
+
snprintf(gidstr, sizeof(gidstr), "%d", pw->pw_gid);
|
1396
|
+
options.args[2] = uidstr;
|
1397
|
+
options.args[3] = gidstr;
|
1398
|
+
options.flags = UV_PROCESS_SETUID | UV_PROCESS_SETGID;
|
1399
|
+
|
1400
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
1401
|
+
if (r == UV_EACCES)
|
1402
|
+
RETURN_SKIP("user 'nobody' cannot access the test runner");
|
1403
|
+
|
1404
|
+
ASSERT(r == 0);
|
1405
|
+
|
1406
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
1407
|
+
ASSERT(r == 0);
|
1408
|
+
|
1409
|
+
ASSERT(exit_cb_called == 1);
|
1410
|
+
ASSERT(close_cb_called == 1);
|
1411
|
+
|
1412
|
+
MAKE_VALGRIND_HAPPY();
|
1413
|
+
return 0;
|
1414
|
+
}
|
1415
|
+
#endif
|
1416
|
+
|
1417
|
+
|
1418
|
+
#ifndef _WIN32
|
1419
|
+
TEST_IMPL(spawn_setuid_fails) {
|
1420
|
+
int r;
|
1421
|
+
|
1422
|
+
/* if root, become nobody. */
|
1423
|
+
uv_uid_t uid = getuid();
|
1424
|
+
if (uid == 0) {
|
1425
|
+
struct passwd* pw;
|
1426
|
+
pw = getpwnam("nobody");
|
1427
|
+
ASSERT(pw != NULL);
|
1428
|
+
ASSERT(0 == setgid(pw->pw_gid));
|
1429
|
+
ASSERT(0 == setuid(pw->pw_uid));
|
1430
|
+
}
|
1431
|
+
|
1432
|
+
init_process_options("spawn_helper1", fail_cb);
|
1433
|
+
|
1434
|
+
options.flags |= UV_PROCESS_SETUID;
|
1435
|
+
options.uid = 0;
|
1436
|
+
|
1437
|
+
/* These flags should be ignored on Unices. */
|
1438
|
+
options.flags |= UV_PROCESS_WINDOWS_HIDE;
|
1439
|
+
options.flags |= UV_PROCESS_WINDOWS_HIDE_CONSOLE;
|
1440
|
+
options.flags |= UV_PROCESS_WINDOWS_HIDE_GUI;
|
1441
|
+
options.flags |= UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS;
|
1442
|
+
|
1443
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
1444
|
+
#if defined(__CYGWIN__)
|
1445
|
+
ASSERT(r == UV_EINVAL);
|
1446
|
+
#else
|
1447
|
+
ASSERT(r == UV_EPERM);
|
1448
|
+
#endif
|
1449
|
+
|
1450
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
1451
|
+
ASSERT(r == 0);
|
1452
|
+
|
1453
|
+
ASSERT(close_cb_called == 0);
|
1454
|
+
|
1455
|
+
MAKE_VALGRIND_HAPPY();
|
1456
|
+
return 0;
|
1457
|
+
}
|
1458
|
+
|
1459
|
+
|
1460
|
+
TEST_IMPL(spawn_setgid_fails) {
|
1461
|
+
int r;
|
1462
|
+
|
1463
|
+
/* if root, become nobody. */
|
1464
|
+
uv_uid_t uid = getuid();
|
1465
|
+
if (uid == 0) {
|
1466
|
+
struct passwd* pw;
|
1467
|
+
pw = getpwnam("nobody");
|
1468
|
+
ASSERT(pw != NULL);
|
1469
|
+
ASSERT(0 == setgid(pw->pw_gid));
|
1470
|
+
ASSERT(0 == setuid(pw->pw_uid));
|
1471
|
+
}
|
1472
|
+
|
1473
|
+
init_process_options("spawn_helper1", fail_cb);
|
1474
|
+
|
1475
|
+
options.flags |= UV_PROCESS_SETGID;
|
1476
|
+
#if defined(__MVS__)
|
1477
|
+
options.gid = -1;
|
1478
|
+
#else
|
1479
|
+
options.gid = 0;
|
1480
|
+
#endif
|
1481
|
+
|
1482
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
1483
|
+
#if defined(__CYGWIN__) || defined(__MVS__)
|
1484
|
+
ASSERT(r == UV_EINVAL);
|
1485
|
+
#else
|
1486
|
+
ASSERT(r == UV_EPERM);
|
1487
|
+
#endif
|
1488
|
+
|
1489
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
1490
|
+
ASSERT(r == 0);
|
1491
|
+
|
1492
|
+
ASSERT(close_cb_called == 0);
|
1493
|
+
|
1494
|
+
MAKE_VALGRIND_HAPPY();
|
1495
|
+
return 0;
|
1496
|
+
}
|
1497
|
+
#endif
|
1498
|
+
|
1499
|
+
|
1500
|
+
#ifdef _WIN32
|
1501
|
+
|
1502
|
+
static void exit_cb_unexpected(uv_process_t* process,
|
1503
|
+
int64_t exit_status,
|
1504
|
+
int term_signal) {
|
1505
|
+
ASSERT(0 && "should not have been called");
|
1506
|
+
}
|
1507
|
+
|
1508
|
+
|
1509
|
+
TEST_IMPL(spawn_setuid_fails) {
|
1510
|
+
int r;
|
1511
|
+
|
1512
|
+
init_process_options("spawn_helper1", exit_cb_unexpected);
|
1513
|
+
|
1514
|
+
options.flags |= UV_PROCESS_SETUID;
|
1515
|
+
options.uid = (uv_uid_t) -42424242;
|
1516
|
+
|
1517
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
1518
|
+
ASSERT(r == UV_ENOTSUP);
|
1519
|
+
|
1520
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
1521
|
+
ASSERT(r == 0);
|
1522
|
+
|
1523
|
+
ASSERT(close_cb_called == 0);
|
1524
|
+
|
1525
|
+
MAKE_VALGRIND_HAPPY();
|
1526
|
+
return 0;
|
1527
|
+
}
|
1528
|
+
|
1529
|
+
|
1530
|
+
TEST_IMPL(spawn_setgid_fails) {
|
1531
|
+
int r;
|
1532
|
+
|
1533
|
+
init_process_options("spawn_helper1", exit_cb_unexpected);
|
1534
|
+
|
1535
|
+
options.flags |= UV_PROCESS_SETGID;
|
1536
|
+
options.gid = (uv_gid_t) -42424242;
|
1537
|
+
|
1538
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
1539
|
+
ASSERT(r == UV_ENOTSUP);
|
1540
|
+
|
1541
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
1542
|
+
ASSERT(r == 0);
|
1543
|
+
|
1544
|
+
ASSERT(close_cb_called == 0);
|
1545
|
+
|
1546
|
+
MAKE_VALGRIND_HAPPY();
|
1547
|
+
return 0;
|
1548
|
+
}
|
1549
|
+
#endif
|
1550
|
+
|
1551
|
+
|
1552
|
+
TEST_IMPL(spawn_auto_unref) {
|
1553
|
+
init_process_options("spawn_helper1", NULL);
|
1554
|
+
ASSERT(0 == uv_spawn(uv_default_loop(), &process, &options));
|
1555
|
+
ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
|
1556
|
+
ASSERT(0 == uv_is_closing((uv_handle_t*) &process));
|
1557
|
+
uv_close((uv_handle_t*) &process, NULL);
|
1558
|
+
ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
|
1559
|
+
ASSERT(1 == uv_is_closing((uv_handle_t*) &process));
|
1560
|
+
MAKE_VALGRIND_HAPPY();
|
1561
|
+
return 0;
|
1562
|
+
}
|
1563
|
+
|
1564
|
+
|
1565
|
+
#ifndef _WIN32
|
1566
|
+
TEST_IMPL(spawn_fs_open) {
|
1567
|
+
int fd;
|
1568
|
+
uv_fs_t fs_req;
|
1569
|
+
uv_pipe_t in;
|
1570
|
+
uv_write_t write_req;
|
1571
|
+
uv_buf_t buf;
|
1572
|
+
uv_stdio_container_t stdio[1];
|
1573
|
+
|
1574
|
+
fd = uv_fs_open(NULL, &fs_req, "/dev/null", O_RDWR, 0, NULL);
|
1575
|
+
ASSERT(fd >= 0);
|
1576
|
+
uv_fs_req_cleanup(&fs_req);
|
1577
|
+
|
1578
|
+
init_process_options("spawn_helper8", exit_cb);
|
1579
|
+
|
1580
|
+
ASSERT(0 == uv_pipe_init(uv_default_loop(), &in, 0));
|
1581
|
+
|
1582
|
+
options.stdio = stdio;
|
1583
|
+
options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE;
|
1584
|
+
options.stdio[0].data.stream = (uv_stream_t*) ∈
|
1585
|
+
options.stdio_count = 1;
|
1586
|
+
|
1587
|
+
ASSERT(0 == uv_spawn(uv_default_loop(), &process, &options));
|
1588
|
+
|
1589
|
+
buf = uv_buf_init((char*) &fd, sizeof(fd));
|
1590
|
+
ASSERT(0 == uv_write(&write_req, (uv_stream_t*) &in, &buf, 1, write_cb));
|
1591
|
+
|
1592
|
+
ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
|
1593
|
+
ASSERT(0 == uv_fs_close(NULL, &fs_req, fd, NULL));
|
1594
|
+
|
1595
|
+
ASSERT(exit_cb_called == 1);
|
1596
|
+
ASSERT(close_cb_called == 2); /* One for `in`, one for process */
|
1597
|
+
|
1598
|
+
MAKE_VALGRIND_HAPPY();
|
1599
|
+
return 0;
|
1600
|
+
}
|
1601
|
+
#endif /* !_WIN32 */
|
1602
|
+
|
1603
|
+
|
1604
|
+
#ifndef _WIN32
|
1605
|
+
TEST_IMPL(closed_fd_events) {
|
1606
|
+
uv_stdio_container_t stdio[3];
|
1607
|
+
uv_pipe_t pipe_handle;
|
1608
|
+
int fd[2];
|
1609
|
+
|
1610
|
+
/* create a pipe and share it with a child process */
|
1611
|
+
ASSERT(0 == pipe(fd));
|
1612
|
+
|
1613
|
+
/* spawn_helper4 blocks indefinitely. */
|
1614
|
+
init_process_options("spawn_helper4", exit_cb);
|
1615
|
+
options.stdio_count = 3;
|
1616
|
+
options.stdio = stdio;
|
1617
|
+
options.stdio[0].flags = UV_INHERIT_FD;
|
1618
|
+
options.stdio[0].data.fd = fd[0];
|
1619
|
+
options.stdio[1].flags = UV_IGNORE;
|
1620
|
+
options.stdio[2].flags = UV_IGNORE;
|
1621
|
+
|
1622
|
+
ASSERT(0 == uv_spawn(uv_default_loop(), &process, &options));
|
1623
|
+
uv_unref((uv_handle_t*) &process);
|
1624
|
+
|
1625
|
+
/* read from the pipe with uv */
|
1626
|
+
ASSERT(0 == uv_pipe_init(uv_default_loop(), &pipe_handle, 0));
|
1627
|
+
ASSERT(0 == uv_pipe_open(&pipe_handle, fd[0]));
|
1628
|
+
fd[0] = -1;
|
1629
|
+
|
1630
|
+
ASSERT(0 == uv_read_start((uv_stream_t*) &pipe_handle, on_alloc, on_read_once));
|
1631
|
+
|
1632
|
+
ASSERT(1 == write(fd[1], "", 1));
|
1633
|
+
|
1634
|
+
ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE));
|
1635
|
+
|
1636
|
+
/* should have received just one byte */
|
1637
|
+
ASSERT(output_used == 1);
|
1638
|
+
|
1639
|
+
/* close the pipe and see if we still get events */
|
1640
|
+
uv_close((uv_handle_t*) &pipe_handle, close_cb);
|
1641
|
+
|
1642
|
+
ASSERT(1 == write(fd[1], "", 1));
|
1643
|
+
|
1644
|
+
ASSERT(0 == uv_timer_init(uv_default_loop(), &timer));
|
1645
|
+
ASSERT(0 == uv_timer_start(&timer, timer_counter_cb, 10, 0));
|
1646
|
+
|
1647
|
+
/* see if any spurious events interrupt the timer */
|
1648
|
+
if (1 == uv_run(uv_default_loop(), UV_RUN_ONCE))
|
1649
|
+
/* have to run again to really trigger the timer */
|
1650
|
+
ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE));
|
1651
|
+
|
1652
|
+
ASSERT(timer_counter == 1);
|
1653
|
+
|
1654
|
+
/* cleanup */
|
1655
|
+
ASSERT(0 == uv_process_kill(&process, /* SIGTERM */ 15));
|
1656
|
+
ASSERT(0 == close(fd[1]));
|
1657
|
+
|
1658
|
+
MAKE_VALGRIND_HAPPY();
|
1659
|
+
return 0;
|
1660
|
+
}
|
1661
|
+
#endif /* !_WIN32 */
|
1662
|
+
|
1663
|
+
TEST_IMPL(spawn_reads_child_path) {
|
1664
|
+
int r;
|
1665
|
+
int len;
|
1666
|
+
char file[64];
|
1667
|
+
char path[1024];
|
1668
|
+
char* env[3];
|
1669
|
+
|
1670
|
+
/* Need to carry over the dynamic linker path when the test runner is
|
1671
|
+
* linked against libuv.so, see https://github.com/libuv/libuv/issues/85.
|
1672
|
+
*/
|
1673
|
+
#if defined(__APPLE__)
|
1674
|
+
static const char dyld_path_var[] = "DYLD_LIBRARY_PATH";
|
1675
|
+
#elif defined __MVS__
|
1676
|
+
static const char dyld_path_var[] = "LIBPATH";
|
1677
|
+
#else
|
1678
|
+
static const char dyld_path_var[] = "LD_LIBRARY_PATH";
|
1679
|
+
#endif
|
1680
|
+
|
1681
|
+
/* Set up the process, but make sure that the file to run is relative and
|
1682
|
+
* requires a lookup into PATH. */
|
1683
|
+
init_process_options("spawn_helper1", exit_cb);
|
1684
|
+
|
1685
|
+
/* Set up the PATH env variable */
|
1686
|
+
for (len = strlen(exepath);
|
1687
|
+
exepath[len - 1] != '/' && exepath[len - 1] != '\\';
|
1688
|
+
len--);
|
1689
|
+
strcpy(file, exepath + len);
|
1690
|
+
exepath[len] = 0;
|
1691
|
+
strcpy(path, "PATH=");
|
1692
|
+
strcpy(path + 5, exepath);
|
1693
|
+
#if defined(__CYGWIN__) || defined(__MSYS__)
|
1694
|
+
/* Carry over the dynamic linker path in case the test runner
|
1695
|
+
is linked against cyguv-1.dll or msys-uv-1.dll, see above. */
|
1696
|
+
{
|
1697
|
+
char* syspath = getenv("PATH");
|
1698
|
+
if (syspath != NULL) {
|
1699
|
+
strcat(path, ":");
|
1700
|
+
strcat(path, syspath);
|
1701
|
+
}
|
1702
|
+
}
|
1703
|
+
#endif
|
1704
|
+
|
1705
|
+
env[0] = path;
|
1706
|
+
env[1] = getenv(dyld_path_var);
|
1707
|
+
env[2] = NULL;
|
1708
|
+
|
1709
|
+
if (env[1] != NULL) {
|
1710
|
+
static char buf[1024 + sizeof(dyld_path_var)];
|
1711
|
+
snprintf(buf, sizeof(buf), "%s=%s", dyld_path_var, env[1]);
|
1712
|
+
env[1] = buf;
|
1713
|
+
}
|
1714
|
+
|
1715
|
+
options.file = file;
|
1716
|
+
options.args[0] = file;
|
1717
|
+
options.env = env;
|
1718
|
+
|
1719
|
+
r = uv_spawn(uv_default_loop(), &process, &options);
|
1720
|
+
ASSERT(r == 0);
|
1721
|
+
|
1722
|
+
r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
1723
|
+
ASSERT(r == 0);
|
1724
|
+
|
1725
|
+
ASSERT(exit_cb_called == 1);
|
1726
|
+
ASSERT(close_cb_called == 1);
|
1727
|
+
|
1728
|
+
MAKE_VALGRIND_HAPPY();
|
1729
|
+
return 0;
|
1730
|
+
}
|
1731
|
+
|
1732
|
+
#ifndef _WIN32
|
1733
|
+
static int mpipe(int *fds) {
|
1734
|
+
if (pipe(fds) == -1)
|
1735
|
+
return -1;
|
1736
|
+
if (fcntl(fds[0], F_SETFD, FD_CLOEXEC) == -1 ||
|
1737
|
+
fcntl(fds[1], F_SETFD, FD_CLOEXEC) == -1) {
|
1738
|
+
close(fds[0]);
|
1739
|
+
close(fds[1]);
|
1740
|
+
return -1;
|
1741
|
+
}
|
1742
|
+
return 0;
|
1743
|
+
}
|
1744
|
+
#else
|
1745
|
+
static int mpipe(int *fds) {
|
1746
|
+
SECURITY_ATTRIBUTES attr;
|
1747
|
+
HANDLE readh, writeh;
|
1748
|
+
attr.nLength = sizeof(attr);
|
1749
|
+
attr.lpSecurityDescriptor = NULL;
|
1750
|
+
attr.bInheritHandle = FALSE;
|
1751
|
+
if (!CreatePipe(&readh, &writeh, &attr, 0))
|
1752
|
+
return -1;
|
1753
|
+
fds[0] = _open_osfhandle((intptr_t)readh, 0);
|
1754
|
+
fds[1] = _open_osfhandle((intptr_t)writeh, 0);
|
1755
|
+
if (fds[0] == -1 || fds[1] == -1) {
|
1756
|
+
CloseHandle(readh);
|
1757
|
+
CloseHandle(writeh);
|
1758
|
+
return -1;
|
1759
|
+
}
|
1760
|
+
return 0;
|
1761
|
+
}
|
1762
|
+
#endif /* !_WIN32 */
|
1763
|
+
|
1764
|
+
TEST_IMPL(spawn_inherit_streams) {
|
1765
|
+
uv_process_t child_req;
|
1766
|
+
uv_stdio_container_t child_stdio[2];
|
1767
|
+
int fds_stdin[2];
|
1768
|
+
int fds_stdout[2];
|
1769
|
+
uv_pipe_t pipe_stdin_child;
|
1770
|
+
uv_pipe_t pipe_stdout_child;
|
1771
|
+
uv_pipe_t pipe_stdin_parent;
|
1772
|
+
uv_pipe_t pipe_stdout_parent;
|
1773
|
+
unsigned char ubuf[OUTPUT_SIZE - 1];
|
1774
|
+
uv_buf_t buf;
|
1775
|
+
unsigned int i;
|
1776
|
+
int r;
|
1777
|
+
int bidir;
|
1778
|
+
uv_write_t write_req;
|
1779
|
+
uv_loop_t* loop;
|
1780
|
+
|
1781
|
+
init_process_options("spawn_helper9", exit_cb);
|
1782
|
+
|
1783
|
+
loop = uv_default_loop();
|
1784
|
+
ASSERT(uv_pipe_init(loop, &pipe_stdin_child, 0) == 0);
|
1785
|
+
ASSERT(uv_pipe_init(loop, &pipe_stdout_child, 0) == 0);
|
1786
|
+
ASSERT(uv_pipe_init(loop, &pipe_stdin_parent, 0) == 0);
|
1787
|
+
ASSERT(uv_pipe_init(loop, &pipe_stdout_parent, 0) == 0);
|
1788
|
+
|
1789
|
+
ASSERT(mpipe(fds_stdin) != -1);
|
1790
|
+
ASSERT(mpipe(fds_stdout) != -1);
|
1791
|
+
|
1792
|
+
ASSERT(uv_pipe_open(&pipe_stdin_child, fds_stdin[0]) == 0);
|
1793
|
+
ASSERT(uv_pipe_open(&pipe_stdout_child, fds_stdout[1]) == 0);
|
1794
|
+
ASSERT(uv_pipe_open(&pipe_stdin_parent, fds_stdin[1]) == 0);
|
1795
|
+
ASSERT(uv_pipe_open(&pipe_stdout_parent, fds_stdout[0]) == 0);
|
1796
|
+
ASSERT(uv_is_readable((uv_stream_t*) &pipe_stdin_child));
|
1797
|
+
ASSERT(uv_is_writable((uv_stream_t*) &pipe_stdout_child));
|
1798
|
+
ASSERT(uv_is_writable((uv_stream_t*) &pipe_stdin_parent));
|
1799
|
+
ASSERT(uv_is_readable((uv_stream_t*) &pipe_stdout_parent));
|
1800
|
+
/* Some systems (SVR4) open a bidirectional pipe, most don't. */
|
1801
|
+
bidir = uv_is_writable((uv_stream_t*) &pipe_stdin_child);
|
1802
|
+
ASSERT(uv_is_readable((uv_stream_t*) &pipe_stdout_child) == bidir);
|
1803
|
+
ASSERT(uv_is_readable((uv_stream_t*) &pipe_stdin_parent) == bidir);
|
1804
|
+
ASSERT(uv_is_writable((uv_stream_t*) &pipe_stdout_parent) == bidir);
|
1805
|
+
|
1806
|
+
child_stdio[0].flags = UV_INHERIT_STREAM;
|
1807
|
+
child_stdio[0].data.stream = (uv_stream_t *)&pipe_stdin_child;
|
1808
|
+
|
1809
|
+
child_stdio[1].flags = UV_INHERIT_STREAM;
|
1810
|
+
child_stdio[1].data.stream = (uv_stream_t *)&pipe_stdout_child;
|
1811
|
+
|
1812
|
+
options.stdio = child_stdio;
|
1813
|
+
options.stdio_count = 2;
|
1814
|
+
|
1815
|
+
ASSERT(uv_spawn(loop, &child_req, &options) == 0);
|
1816
|
+
|
1817
|
+
uv_close((uv_handle_t*)&pipe_stdin_child, NULL);
|
1818
|
+
uv_close((uv_handle_t*)&pipe_stdout_child, NULL);
|
1819
|
+
|
1820
|
+
buf = uv_buf_init((char*)ubuf, sizeof ubuf);
|
1821
|
+
for (i = 0; i < sizeof ubuf; ++i)
|
1822
|
+
ubuf[i] = i & 255u;
|
1823
|
+
memset(output, 0, sizeof ubuf);
|
1824
|
+
|
1825
|
+
r = uv_write(&write_req,
|
1826
|
+
(uv_stream_t*)&pipe_stdin_parent,
|
1827
|
+
&buf,
|
1828
|
+
1,
|
1829
|
+
write_cb);
|
1830
|
+
ASSERT(r == 0);
|
1831
|
+
|
1832
|
+
r = uv_read_start((uv_stream_t*)&pipe_stdout_parent, on_alloc, on_read);
|
1833
|
+
ASSERT(r == 0);
|
1834
|
+
|
1835
|
+
r = uv_run(loop, UV_RUN_DEFAULT);
|
1836
|
+
ASSERT(r == 0);
|
1837
|
+
|
1838
|
+
ASSERT(exit_cb_called == 1);
|
1839
|
+
ASSERT(close_cb_called == 3);
|
1840
|
+
|
1841
|
+
r = memcmp(ubuf, output, sizeof ubuf);
|
1842
|
+
ASSERT(r == 0);
|
1843
|
+
|
1844
|
+
MAKE_VALGRIND_HAPPY();
|
1845
|
+
return 0;
|
1846
|
+
}
|
1847
|
+
|
1848
|
+
TEST_IMPL(spawn_quoted_path) {
|
1849
|
+
#ifndef _WIN32
|
1850
|
+
RETURN_SKIP("Test for Windows");
|
1851
|
+
#else
|
1852
|
+
char* quoted_path_env[2];
|
1853
|
+
args[0] = "not_existing";
|
1854
|
+
args[1] = NULL;
|
1855
|
+
options.file = args[0];
|
1856
|
+
options.args = args;
|
1857
|
+
options.exit_cb = exit_cb;
|
1858
|
+
options.flags = 0;
|
1859
|
+
/* We test if search_path works correctly with semicolons in quoted path. We
|
1860
|
+
* will use an invalid drive, so we are sure no executable is spawned. */
|
1861
|
+
quoted_path_env[0] = "PATH=\"xyz:\\test;\";xyz:\\other";
|
1862
|
+
quoted_path_env[1] = NULL;
|
1863
|
+
options.env = quoted_path_env;
|
1864
|
+
|
1865
|
+
/* We test if libuv will not segfault. */
|
1866
|
+
uv_spawn(uv_default_loop(), &process, &options);
|
1867
|
+
|
1868
|
+
MAKE_VALGRIND_HAPPY();
|
1869
|
+
return 0;
|
1870
|
+
#endif
|
1871
|
+
}
|
1872
|
+
|
1873
|
+
/* Helper for child process of spawn_inherit_streams */
|
1874
|
+
#ifndef _WIN32
|
1875
|
+
void spawn_stdin_stdout(void) {
|
1876
|
+
char buf[1024];
|
1877
|
+
char* pbuf;
|
1878
|
+
for (;;) {
|
1879
|
+
ssize_t r, w, c;
|
1880
|
+
do {
|
1881
|
+
r = read(0, buf, sizeof buf);
|
1882
|
+
} while (r == -1 && errno == EINTR);
|
1883
|
+
if (r == 0) {
|
1884
|
+
return;
|
1885
|
+
}
|
1886
|
+
ASSERT(r > 0);
|
1887
|
+
c = r;
|
1888
|
+
pbuf = buf;
|
1889
|
+
while (c) {
|
1890
|
+
do {
|
1891
|
+
w = write(1, pbuf, (size_t)c);
|
1892
|
+
} while (w == -1 && errno == EINTR);
|
1893
|
+
ASSERT(w >= 0);
|
1894
|
+
pbuf = pbuf + w;
|
1895
|
+
c = c - w;
|
1896
|
+
}
|
1897
|
+
}
|
1898
|
+
}
|
1899
|
+
#else
|
1900
|
+
void spawn_stdin_stdout(void) {
|
1901
|
+
char buf[1024];
|
1902
|
+
char* pbuf;
|
1903
|
+
HANDLE h_stdin = GetStdHandle(STD_INPUT_HANDLE);
|
1904
|
+
HANDLE h_stdout = GetStdHandle(STD_OUTPUT_HANDLE);
|
1905
|
+
ASSERT(h_stdin != INVALID_HANDLE_VALUE);
|
1906
|
+
ASSERT(h_stdout != INVALID_HANDLE_VALUE);
|
1907
|
+
for (;;) {
|
1908
|
+
DWORD n_read;
|
1909
|
+
DWORD n_written;
|
1910
|
+
DWORD to_write;
|
1911
|
+
if (!ReadFile(h_stdin, buf, sizeof buf, &n_read, NULL)) {
|
1912
|
+
ASSERT(GetLastError() == ERROR_BROKEN_PIPE);
|
1913
|
+
return;
|
1914
|
+
}
|
1915
|
+
to_write = n_read;
|
1916
|
+
pbuf = buf;
|
1917
|
+
while (to_write) {
|
1918
|
+
ASSERT(WriteFile(h_stdout, pbuf, to_write, &n_written, NULL));
|
1919
|
+
to_write -= n_written;
|
1920
|
+
pbuf += n_written;
|
1921
|
+
}
|
1922
|
+
}
|
1923
|
+
}
|
1924
|
+
#endif /* !_WIN32 */
|