#!/usr/local/bin/ruby
#
# Copyright 2005 Perforce Software. All rights reserved.
#
require "../../cur.triggers/P4Data.rb"
require "../../cur.triggers/P4Form.rb"
failures = 0
if ischangelist("1") then
# TEST FOR CLEAN SYSTEM
printf("System currently populated restart server and try again\n")
else
printf("Populating system with test data\n")
`p4 jobspec -i < history-spec.txt` # Define the jobspec
`sh changelist.sh one` # Create changelist 1
`sh changelist.sh two` # Create changelist 2
`sh changelist.sh three` # Create changelist 3
`sh newjob.sh` # Create job000001
`sh newjob.sh` # Create job000002
`sh newjob.sh` # Create job000003
`p4 job -o job000001 | grep -v 'Date' | sed -e 's=..../../.. ..:..:..=yyyy/mm/dd hh:mm:ss=' > job.step0`
printf(`diff job.step0.base job.step0`)
printf("Adding Fields...")
`cat history-add.txt > job01.tmp` # Copy job for reported date
print `p4 job -o job000001 | egrep '^ReportedDate:' >> job01.tmp`
print `echo \"EJPUserID: one\" >> job01.tmp`
print `p4 job -f -i < job01.tmp`
`p4 job -o job000001 | grep -v 'Date' | sed -e 's=..../../.. ..:..:..=yyyy/mm/dd hh:mm:ss=' > job.step1`
printf(`diff job.step1.base job.step1`)
printf("Modifying Fields...")
`cat history-mod.txt > job01.tmp` # Copy job for reported date
print `p4 job -o job000001 | egrep '^ReportedDate:' >> job01.tmp`
print `echo \"EJPUserID: one\" >> job01.tmp`
print `p4 job -f -i < job01.tmp`
`p4 job -o job000001 | grep -v 'Date' | sed -e 's=..../../.. ..:..:..=yyyy/mm/dd hh:mm:ss=' > job.step2`
printf(`diff job.step2.base job.step2`)
printf("Deleting Fields...")
`cat history-del.txt > job01.tmp` # Copy job for reported date
print `p4 job -o job000001 | egrep '^ReportedDate:' >> job01.tmp`
print `echo \"EJPUserID: one\" >> job01.tmp`
print `p4 job -f -i < job01.tmp`
`p4 job -o job000001 | grep -v 'Date' | sed -e 's=..../../.. ..:..:..=yyyy/mm/dd hh:mm:ss=' > job.step3`
printf(`diff job.step3.base job.step3`)
File.unlink("job01.tmp")
File.unlink("job.step0")
File.unlink("job.step1")
File.unlink("job.step2")
File.unlink("job.step3")
end
# |
Change |
User |
Description |
Committed |
|
#1
|
8493 |
Alan H Teague |
Initial import of the Enhanced Jobs Project |
|
|