Skip to content

Commit 3f3f618

Browse files
authored
Merge pull request #391 from dskkato/remove_binary_files
remove binary files from repository
2 parents b9b84b7 + e8d66ec commit 3f3f618

File tree

6 files changed

+18
-16
lines changed

6 files changed

+18
-16
lines changed

RELEASING.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Note that any crate not mentioned here (e.g. tensorflow-proto-codegen, tensorflo
3737
1. Bump the version number in `Cargo.toml`
3838
1. Bump the version number in `README.md`
3939
1. Run `./test-all`
40-
1. Double-check that addition.py and test_op are built using the version of TensorFlow being linked against. (See "Upgrading TensorFlow" section.)
40+
1. Double-check that addition.py is built using the version of TensorFlow being linked against. (See "Upgrading TensorFlow" section.)
4141
1. Run `./run-valgrind`
4242
1. Commit and push the changes. (Push before publishing to ensure that the changes being published are up to date.)
4343
1. If the version of tensorflow-sys was bumped, run `cargo publish` for tensorflow-sys. (Publish before tagging in case there are problems publishing and we need to add commits to fix them.)
@@ -64,5 +64,4 @@ Note that any crate not mentioned here (e.g. tensorflow-proto-codegen, tensorflo
6464
1. Run `pip install --upgrade pip`
6565
1. Run `pip install --upgrade tensorflow==${TENSORFLOW_VERSION?}`
6666
1. Run `python examples/addition/addition.py`
67-
1. Run `test_resources/library/build-test-op` and move `test_op.so` into `test_resources/library/linux`.
6867
1. Run `deactivate` to exit the virtualenv

src/lib.rs

+15-14
Original file line numberDiff line numberDiff line change
@@ -2663,22 +2663,23 @@ mod tests {
26632663
assert!(get_registered_kernels_for_op("Add").unwrap().len() > 0);
26642664
}
26652665

2666+
#[cfg(target_os = "linux")]
26662667
#[test]
2668+
#[ignore]
26672669
fn test_library_load() {
2668-
// This test is not yet implemented for Windows
2669-
let check_path = match std::env::consts::OS {
2670-
"linux" => Some("test_resources/library/linux/test_op.so"),
2671-
// TODO: The test op needs to be recompiled for macos.
2672-
// "macos" => Some("test_resources/library/macos/test_op.so"),
2673-
_ => None,
2674-
};
2675-
if let Some(path) = check_path {
2676-
let lib = Library::load(path).unwrap();
2677-
let ops: Vec<OpDef> = lib.op_list().clone().into();
2678-
assert!(ops.len() == 1);
2679-
let op = &ops[0];
2680-
assert!(op.name() == "TestOpList");
2681-
};
2670+
// This test is implemented for linux only.
2671+
let lib_path = "test_resources/library/test_op.so";
2672+
assert!(
2673+
std::path::Path::new(lib_path).exists(),
2674+
"`{}` was not found. Build the lib and try again : `{}`",
2675+
lib_path,
2676+
"(cd test_resources/library && ./build-test-op)"
2677+
);
2678+
let lib = Library::load(lib_path).unwrap();
2679+
let ops: Vec<OpDef> = lib.op_list().clone().into();
2680+
assert!(ops.len() == 1);
2681+
let op = &ops[0];
2682+
assert!(op.name() == "TestOpList");
26822683
}
26832684

26842685
#[test]

test-all

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ if [[ "${version_tensorflow_sys_crate}" != "${version_tensorflow_sys_readme}" ]]
4848
fi
4949

5050
run python3 examples/mobilenetv3/create_model.py
51+
# TODO(#391): Re-enable: (cd test_resources/library && ./build-test-op)
5152
run cargo fmt --all -- --check
5253
run cargo test -vv -j 2
5354
run cargo test -vv -j 2 --features eager

test_resources/library/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.so
-22.9 KB
Binary file not shown.
-13.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)