bin/calabash-android-run.rb in calabash-android-0.1.0 vs bin/calabash-android-run.rb in calabash-android-0.2.0.pre2

- old
+ new

@@ -1,7 +1,6 @@ -def calabash_run(args) - run_build_if_test_server_does_not_exist +def calabash_run(app_path) old_runner = "android.test.InstrumentationTestRunner" new_rummer = "sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner" f = "features/support/app_life_cycle_hooks.rb" @@ -11,17 +10,20 @@ puts "1) Open #{f} in a text editor" puts "2) Replace #{old_runner} with #{new_rummer}" exit end - settings = JSON.parse(IO.read(".calabash_settings")) - - env ="PACKAGE_NAME=#{settings["package_name"]} "\ - "TEST_PACKAGE_NAME=#{settings["package_name"]}.test "\ - "APP_PATH=#{settings["app_path"]} "\ - "TEST_APP_PATH=features/support/Test.apk "\ - "TEST_SERVER_PORT=34777" - + if app_path + test_server_path = "features/support/#{checksum(app_path)}.apk" + env = "PACKAGE_NAME=#{package_name(app_path)} "\ + "TEST_PACKAGE_NAME=#{package_name(test_server_path)} "\ + "APP_PATH=#{app_path} "\ + "TEST_APP_PATH=#{test_server_path} "\ + "TEST_SERVER_PORT=34777" + else + env = "" + end + STDOUT.sync = true cmd = "cucumber -c #{ARGV.join(" ")} #{env}" puts cmd IO.popen(cmd) do |io| io.each { |s| print s } \ No newline at end of file