Remove unused PubCommand stuff.

The rest of the pub functionality was removed already, so I think this
is just a straggler.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2944163002 .
This commit is contained in:
Bob Nystrom 2017-06-23 12:55:45 -07:00
parent ebffa49eac
commit 3144296c4f
2 changed files with 0 additions and 53 deletions

View file

@ -103,13 +103,6 @@ class Command {
sourceDirectory, destinationDirectory);
}
static Command pub(String pubCommand, String pubExecutable,
String pubspecYamlDirectory, String pubCacheDirectory,
{List<String> arguments: const <String>[]}) {
return new PubCommand._(pubCommand, pubExecutable, pubspecYamlDirectory,
pubCacheDirectory, arguments);
}
static Command makeSymlink(String link, String target) {
return new MakeSymlinkCommand._(link, target);
}
@ -479,28 +472,6 @@ class JSCommandlineCommand extends ProcessCommand {
: super._(displayName, executable, arguments, environmentOverrides);
}
class PubCommand extends ProcessCommand {
final String command;
PubCommand._(String pubCommand, String pubExecutable,
String pubspecYamlDirectory, String pubCacheDirectory, List<String> args)
: command = pubCommand,
super._(
'pub_$pubCommand',
new io.File(pubExecutable).absolute.path,
[pubCommand]..addAll(args),
{'PUB_CACHE': pubCacheDirectory},
pubspecYamlDirectory);
void _buildHashCode(HashCodeBuilder builder) {
super._buildHashCode(builder);
builder.addJson(command);
}
bool _equal(PubCommand other) =>
super._equal(other) && command == other.command;
}
/// [ScriptCommand]s are executed by dart code.
abstract class ScriptCommand extends Command {
ScriptCommand._(String displayName) : super._(displayName);

View file

@ -760,27 +760,6 @@ class JSCommandLineOutput extends CommandOutput
}
}
class PubCommandOutput extends CommandOutput {
PubCommandOutput(PubCommand command, int exitCode, bool timedOut,
List<int> stdout, List<int> stderr, Duration time)
: super(command, exitCode, timedOut, stdout, stderr, time, false, 0);
Expectation result(TestCase testCase) {
// Handle crashes and timeouts first.
if (hasCrashed) return Expectation.crash;
if (hasTimedOut) return Expectation.timeout;
if (hasNonUtf8) return Expectation.nonUtf8Error;
if (exitCode == 0) {
return Expectation.pass;
} else if ((command as PubCommand).command == 'get') {
return Expectation.pubGetError;
} else {
return Expectation.fail;
}
}
}
class ScriptCommandOutput extends CommandOutput {
final Expectation _result;
@ -830,9 +809,6 @@ CommandOutput createCommandOutput(Command command, int exitCode, bool timedOut,
} else if (command is JSCommandlineCommand) {
return new JSCommandLineOutput(
command, exitCode, timedOut, stdout, stderr, time);
} else if (command is PubCommand) {
return new PubCommandOutput(
command, exitCode, timedOut, stdout, stderr, time);
}
return new CommandOutput(command, exitCode, timedOut, stdout, stderr, time,