improve testrepo and related tests

- Make #branch_sha test fixed by creating a specific branch for this test.
- Add script 'test' for upcoming building tests:
    case ARGV[0]
    when "pass"
      puts "pass"
      exit 0
    else
      puts "fail"
      exit 1
    end