Changeset 591
- Timestamp:
- 03/29/07 14:38:43 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/bin/applications/nightly_build_test_infrastructure/chroot.rb
r589 r591 63 63 run "#{@sudo}mkdir #{@complete_path}" 64 64 run "#{@sudo}debootstrap #{@release} #{@complete_path} http://ftp.debian.org/debian/ >> #{@log_file}" 65 run "#{@sudo}cp /etc/fstab /root/fstab.orig" 65 66 run "#{@sudo}echo \"/proc #{@complete_path}/proc proc defaults 0 0\" >> /etc/fstab" 66 67 run "#{@sudo}echo \"/dev #{@complete_path}/dev dev defaults 0 0\" >> /etc/fstab" 68 run "#{@sudo}echo \"cd /dev; /sbin/MAKEDEV generic; cd -\" >> /#{@complete_path}/root/dev_create" 69 run "#{@sudo]chroot #{@complete_path} sh root/dev_create" 67 70 run "#{@sudo}mount #{@complete_path}/proc" 68 run "#{@sudo}mount --bind /dev #{@complete_path}/dev"71 run "#{@sudo}mount /dev #{@complete_path}/dev -o bind" 69 72 70 73 return @complete_path … … 121 124 end 122 125 126 # This method unmounts any directories that the chroot mounted previously 127 def clean_up_chroot 128 run "#{@sudo}umount #{@complete_path}/proc" 129 run "#{@sudo}umount #{@complete_path}/dev" 130 run "#{@sudo}mv /root/fstab.orig /etc/fstab" 131 end 132 123 133 private 124 134 trunk/bin/applications/nightly_build_test_infrastructure/hefeweizen-test-system.rb
r589 r591 79 79 begin 80 80 81 @logger.info "Creating new chroot..." 81 82 path = chroot.create 82 83 @logger.info "Created new chroot with the name '#{chroot_name}' at the following path: #{path}" 84 85 83 86 84 87 @logger.info "Installing subversion and setting up ssl certificate" … … 113 116 chroot.copy_test_result_to "#{@target_path}/#{RESULTS_PATH}", prefix = chroot_name 114 117 118 @logger.info "Clean up system" 119 chroot.clean_up_chroot 120 115 121 @logger.info "No problems reported. Check the result of the test." 116 122
