sapling/eden/scm/tests/test-hgsql-profiler.t
Durham Goode 74da65a38f py3: reupgrade mysql-connector-python to yummy version
Summary:
This is required for migrating to python 3. Originally this broke
builds on non-fbcode centos7 platforms. Since we don't need hgsql in non-fbcode
platforms, I've just tweaked it to skip the hgsql tests for non-fbcode centos7.

Reviewed By: quark-zju

Differential Revision: D22140187

fbshipit-source-id: 01676db9d006375bd3b5ae9e8f13f5592e36b074
2020-06-19 15:25:26 -07:00

46 lines
861 B
Raku

#chg-compatible
$ . "$TESTDIR/hgsql/library.sh"
# Populate the db with an initial commit
$ initclient client
$ cd client
$ echo x > x
$ hg commit -qAm x
$ cd ..
$ initserver master masterrepo
# Test with stat profiler
$ cat >> master/.hg/hgrc <<EOF
> [hgsql]
> profiler=stat
> profileoutput=$TESTTMP/
> EOF
$ cd client
$ hg push -q ssh://user@dummy/master
$ cat $TESTTMP/hgsql-profile* | grep "Total Elapsed Time"
Total Elapsed Time: * (glob)
$ rm -f $TESTTMP/hgsql-profile*
$ cd ..
# Test with ls profiler
$ cat >> master/.hg/hgrc <<EOF
> [hgsql]
> profiler=ls
> profileoutput=$TESTTMP/
> EOF
$ cd client
$ echo x >> x
$ hg commit -qAm x
$ hg push -q ../master
$ cat $TESTTMP/hgsql-profile* | grep "Total Elapsed Time"
Total Elapsed Time: * (glob)
$ rm -f $TESTTMP/hgsql-profile*
$ cd ..