Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions torchci/components/job/ODCCommand.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,20 @@ export function ODCommandInstructions({
/>
<InstructionItem
index={5}
title="Download the binary"
title="Run the test"
component={
<>
<Typography variant="body1">Run the test</Typography>
<TerminalCopyBox text={command} />
</>
command == undefined ? (
<Typography variant="body1">
We were unable to extract the test command from the job log.
Please check the log manually to find the command to run the
test.
</Typography>
) : (
<>
<Typography variant="body1">Run the test</Typography>
<TerminalCopyBox text={command} />
</>
)
}
/>
</Stack>
Expand Down Expand Up @@ -366,10 +374,10 @@ function useInformationFromJobLog(
"To execute this test, run the following from the base repo dir:"
)
);
if (reproCommandLine === -1) {
return undefined;
}
const command = noTimeStampLogLines[reproCommandLine + 1].trim();
const command =
reproCommandLine === -1
? undefined
: noTimeStampLogLines[reproCommandLine + 1].trim();

// Machine type
let gpuType: string = "CPU-X86";
Expand Down