aboutsummaryrefslogtreecommitdiff
path: root/run_integration_test.rb
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-04-11 14:47:06 +0900
committerShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-04-11 14:47:34 +0900
commit9f25a3ba181dece83eb1f934cfa771e379131d61 (patch)
treefea1f6669d1228c7a3f1ef0b6cbdf63089a7e648 /run_integration_test.rb
parentb3208fc929fe1da5a827e43cb0f35d983c2b5e0f (diff)
downloadkati-9f25a3ba181dece83eb1f934cfa771e379131d61.tar.gz
Make it possible to run make -n in repo/android
Diffstat (limited to 'run_integration_test.rb')
-rwxr-xr-xrun_integration_test.rb19
1 files changed, 16 insertions, 3 deletions
diff --git a/run_integration_test.rb b/run_integration_test.rb
index 6ecbf82..6cc0813 100755
--- a/run_integration_test.rb
+++ b/run_integration_test.rb
@@ -87,9 +87,22 @@ class AndroidTestCase < TestCase
name = 'android'
checkout = Proc.new{|tc|
FileUtils.mkdir_p(@name)
- Dir.chdir(@name) {
- check_command("tar -xzf ../android.tgz")
- }
+ md5 = `md5sum android.tgz`
+ need_update = true
+ if File.exist?("#{@name}/STAMP")
+ stamp = File.read("#{@name}/STAMP")
+ if md5 == stamp
+ need_update = false
+ end
+ end
+
+ if need_update
+ check_command("tar -xzf android.tgz")
+ File.open("#{@name}/STAMP.tmp", 'w') do |ofile|
+ ofile.print(md5)
+ end
+ File.rename("#{@name}/STAMP.tmp", "#{@name}/STAMP")
+ end
}
super(name, checkout, DO_NOTHING, DO_NOTHING, 'dump-products')