cstore-tests: move remotefilelog py tests to .t test

Summary:
A future patch which renamed cdatapack.so to cstore.so pointed out that our
test-remotefilelog*.py tests are running against the system remotefilelog. Let's
move them to a .t test that sets the appropriate PYTHONPATH.

Test Plan: Ran the tests

Reviewers: #mercurial, simonfar

Reviewed By: simonfar

Subscribers: stash, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4581281

Signature: t1:4581281:1487788843:365c6adf41ba51bdbe7394c1ab423fcc5a63bdbc
This commit is contained in:
Durham Goode 2017-02-23 14:03:02 -08:00
parent 9e07f19a8b
commit 85ff1268f8
3 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,4 @@
#!/usr/bin/env python
import hashlib import hashlib
import os import os
import random import random

View File

@ -1,3 +1,4 @@
#!/usr/bin/env python
import hashlib import hashlib
import os import os
import random import random

16
tests/test-cstore.t Normal file
View File

@ -0,0 +1,16 @@
Get build path for native extensions
- Do this as a separate script so we can eat the ls errors
$ cat >> $TESTTMP/getbuildpath.sh <<EOF
> BUILD_PATH="`ls -d $TESTDIR/`"
> BUILD_PATH="\$BUILD_PATH:`ls -d $TESTDIR/../build/lib* 2> /dev/null`"
> BUILD_PATH="\$BUILD_PATH:`ls -d $TESTDIR/../../rpmbuild/BUILD/fb-mercurial-ext-*/build/lib.*/ 2> /dev/null`"
> echo "\$BUILD_PATH"
> EOF
$ chmod a+x $TESTTMP/getbuildpath.sh
$ BUILD_PATH="`$TESTTMP/getbuildpath.sh`"
$ PYTHONPATH="$BUILD_PATH:$PYTHONPATH"
$ export PYTHONPATH
$ python $TESTDIR/remotefilelog-datapack.py
$ python $TESTDIR/remotefilelog-histpack.py