anchor.diff:  
       var process = new ScheduledProcess.start(
           p.join(sandboxDir, cachePath, "bin/foo-script"), ["arg1", "arg2"],
  -        environment: getPubTestEnvironment());
  +        environment: getEnvironment());
   
       process.stdout.expect("ok [arg1, arg2]");
       process.shouldExit();
     });
   }
  +
  +/// The buildbots do not have the Dart SDK (containing "dart" and "pub") on
  +/// their PATH, so we need to spawn the binstub process with a PATH that
  +/// explicitly includes it.
  +getEnvironment() {
  +  var binDir = p.dirname(Platform.executable);
  +  var separator = Platform.operatingSystem == "windows" ? ";" : ":";
  +  var path = "${Platform.environment["PATH"]}$separator$binDir";
  +
  +  var environment = getPubTestEnvironment();
  +  environment["PATH"] = path;
  +  return environment;
  +}
  
positive.code: // for details. All rights reserved. Use of this source code is governed by a
  // BSD-style license that can be found in the LICENSE file.
  
  import 'package:path/path.dart' as p;
  import 'package:scheduled_test/scheduled_process.dart';
  
  import '../../descriptor.dart' as d;
  import '../../test_pub.dart';
  
negative.code:     schedulePub(args: ["global", "activate", "foo"]);
  
      var process = new ScheduledProcess.start(
          p.join(sandboxDir, cachePath, "bin/foo-script"), ["arg1", "arg2"],
          environment: getEnvironment());
  
      process.stdout.expect("ok [arg1, arg2]");
      process.shouldExit();
  