Skip to content

Commit

Permalink
fix test_multiple_errors_print_with_*_console on windows
Browse files Browse the repository at this point in the history
Reviewed By: Will-MingLun-Li

Differential Revision: D68439712

fbshipit-source-id: e204ec181e258530238e82d0a99c7ca817ba7714
  • Loading branch information
blackm00n authored and facebook-github-bot committed Jan 21, 2025
1 parent e5ac510 commit e0c2393
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tests/e2e/build/test_build_isolated.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import json
import os
import platform
import re
import sys
from pathlib import Path
Expand Down Expand Up @@ -87,8 +88,10 @@ async def test_multiple_errors_print_with_simple_console(buck: Buck) -> None:
assert_occurrences(execution_error.format("root//:foo"), e.stderr, 2)
assert_occurrences(execution_error.format("root//:bar"), e.stderr, 2)

exit_code = "(Local|Remote) command returned non-zero exit code 1"
assert_occurrences_regex(exit_code, e.stderr, 6)
# TODO: Windows handle wrong binary path as internal error, maybe we should fix it.
if platform.system() != "Windows":
exit_code = "(Local|Remote) command returned non-zero exit code 1"
assert_occurrences_regex(exit_code, e.stderr, 6)

build_error = "Failed to build '{} (<unspecified>)'"
assert_occurrences(build_error.format("root//:foo"), e.stderr, 1)
Expand Down Expand Up @@ -121,8 +124,10 @@ async def test_multiple_errors_print_with_super_console(buck: Buck) -> None:
execution_error = "Action failed: "
assert_occurrences_regex(execution_error, e.stderr, 3)

exit_code = "(Local|Remote) command returned non-zero exit code 1"
assert_occurrences_regex(exit_code, e.stderr, 3)
# TODO: Windows handle wrong binary path as internal error, maybe we should fix it.
if platform.system() != "Windows":
exit_code = "(Local|Remote) command returned non-zero exit code 1"
assert_occurrences_regex(exit_code, e.stderr, 3)

# These will eventually be red.
build_error = "Failed to build '{} (<unspecified>)'"
Expand Down

0 comments on commit e0c2393

Please sign in to comment.