|  | # Copyright 2024 The Fuchsia Authors. All rights reserved. | 
|  | # Use of this source code is governed by a BSD-style license that can be | 
|  | # found in the LICENSE file. | 
|  |  | 
|  | load("@bazel_skylib//rules:diff_test.bzl", "diff_test") | 
|  |  | 
|  | # These actions can all be run remotely, and do not require any toolchain. | 
|  |  | 
|  | # The working directory depends on local vs. remote execution. | 
|  | genrule( | 
|  | name = "pwd", | 
|  | cmd = "pwd > $@", | 
|  | outs = ["pwd.txt"], | 
|  | ) | 
|  |  | 
|  | # This test will pass only if :pwd was run remotely. | 
|  | diff_test( | 
|  | name = "remote_pwd_test", | 
|  | file1 = "expect_pwd.txt", | 
|  | file2 = ":pwd", | 
|  | ) |