Skip to content

Commit a7aefe8

Browse files
committed
enable pattern to be used for autotesting
1 parent c6c1afa commit a7aefe8

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Rakefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Rake::TestTask.new do |t|
2525
end
2626

2727
desc 'Verify ISO'
28-
task :iso, [:box_name] do |t,args|
28+
task :iso, [:template_name] do |t,args|
2929
require 'net/http'
3030
#if args.to_hash.size!=1
3131
#puts "needs one arguments: rake iso [\"yourname\"]"
@@ -64,14 +64,20 @@ task :iso, [:box_name] do |t,args|
6464
end
6565
end
6666

67-
desc 'Autobuilds all templates and runs validation'
68-
task :autotest do
67+
desc 'Autobuilds all templates and runs validation.'
68+
task :autotest, [:pattern] do |t,args|
6969

7070
# We overrule all timeouts for tcp and ssh
7171
#ENV['VEEWEE_TIMEOUT']='600'
7272

7373
ve=Veewee::Environment.new()
7474
ve.templates.each do |name,template|
75+
76+
# If pattern was given, only take the ones that match the pattern
77+
unless args[:pattern].nil?
78+
next unless name.match(args[:pattern])
79+
end
80+
7581
begin
7682
ve.definitions.define("auto",name, { 'force' => true})
7783
vd=ve.definitions["auto"]
@@ -94,5 +100,6 @@ task :autotest do
94100
end
95101
end
96102
end
103+
97104
end
98105
end

0 commit comments

Comments
 (0)