Skip to content

Commit

Permalink
Cleanup files in tests after R CMD build
Browse files Browse the repository at this point in the history
The .o files in the src/lib directory of exampleC package are
non-standard and are not automatically cleaned up by `R CMD BUILD`. So
they need to be cleaned manually.

exampleC/src/lib/*.o also contains the compile dir which is a temp
directory and makes our reproducibility test fail because exampleC.so is
not reproducible.
  • Loading branch information
siddharthab committed Apr 25, 2020
1 parent c8571a7 commit c72e179
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/exampleC/cleanup
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
# Copyright 2020 The Bazel Authors.
#
# 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.

# Remove any non-standard files generated by `R CMD BUILD` and not
# automatically cleaned up.
# src/lib/*.o files also contain the compile dir which is a temp dir and makes
# them not byte reproducible.
rm -f src/lib/*.o

0 comments on commit c72e179

Please sign in to comment.