Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed glob includes for ignore_root_user_error #1037

Merged
merged 4 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
21 changes: 21 additions & 0 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,3 +273,24 @@ tasks:
name: pip_repository_entry_points integration tests on Windows
working_directory: tests/pip_repository_entry_points
platform: windows

integration_test_ignore_root_user_error_ubuntu:
<<: *reusable_build_test_all
name: ignore_root_user_error integration tests on Ubuntu
working_directory: tests/ignore_root_user_error
platform: ubuntu2004
integration_test_ignore_root_user_error_debian:
<<: *reusable_build_test_all
name: ignore_root_user_error integration tests on Debian
working_directory: tests/ignore_root_user_error
platform: debian11
integration_test_ignore_root_user_error_macos:
<<: *reusable_build_test_all
name: ignore_root_user_error integration tests on macOS
working_directory: tests/ignore_root_user_error
platform: macos
integration_test_ignore_root_user_error_windows:
<<: *reusable_build_test_all
name: ignore_root_user_error integration tests on Windows
working_directory: tests/ignore_root_user_error
platform: windows
5 changes: 5 additions & 0 deletions tests/ignore_root_user_error/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
test --test_output=errors

# Windows requires these for multi-python support:
build --enable_runfiles
startup --windows_enable_symlinks
1 change: 1 addition & 0 deletions tests/ignore_root_user_error/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bazel-*
7 changes: 7 additions & 0 deletions tests/ignore_root_user_error/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
load("@rules_python//python:defs.bzl", "py_test")

py_test(
name = "foo_test",
srcs = ["foo_test.py"],
visibility = ["//visibility:public"],
)
12 changes: 12 additions & 0 deletions tests/ignore_root_user_error/WORKSPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
local_repository(
name = "rules_python",
path = "../..",
)

load("@rules_python//python:repositories.bzl", "python_register_toolchains")

python_register_toolchains(
name = "python39",
ignore_root_user_error = True,
python_version = "3.9",
)
13 changes: 13 additions & 0 deletions tests/ignore_root_user_error/foo_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2019 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.