mirror of
https://github.com/ddworken/hishtory.git
synced 2025-02-02 11:39:24 +01:00
Revert all the windows+freebsd commits since they seem to be hopelessly broken
This commit is contained in:
parent
02b093c56d
commit
e46221f893
14
.cirrus.yml
14
.cirrus.yml
@ -1,14 +0,0 @@
|
||||
freebsd_instance:
|
||||
image: freebsd-12-2-release-amd64
|
||||
task:
|
||||
name: freebsd-test
|
||||
env:
|
||||
TZ: 'America/Los_Angeles' # Force the time zone so that test output is consistent
|
||||
GITHUB_ACTION: 'true'
|
||||
setup_script:
|
||||
- id
|
||||
- pkg install -y bash zsh fish curl go tmux
|
||||
- sudo hostname ghaction-runner-hostname # Set a consistent hostname so we can run tests that depend on it
|
||||
test_script:
|
||||
- id
|
||||
- make test
|
5
.github/workflows/go-test.yml
vendored
5
.github/workflows/go-test.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -23,14 +23,13 @@ jobs:
|
||||
go-version: 1.18
|
||||
# - uses: mxschmitt/action-tmate@v3
|
||||
- name: Go test
|
||||
shell: bash
|
||||
if: ${{ !startsWith(github.event.head_commit.message, 'Release') }}
|
||||
run: |
|
||||
sudo apt-get update || true
|
||||
sudo apt-get install -y zsh fish || true
|
||||
brew install fish tmux bash || true
|
||||
export TZ='America/Los_Angeles' # Force the time zone so that test output is consistent
|
||||
sudo chmod 0755 -R /usr/share/zsh/ || true # Work around a weird bug where zsh on ubuntu actions gives that diretory 0777 which makes zsh refuse to start
|
||||
sudo chmod 0755 -R /usr/share/zsh/ || true # Work around a weird bug where zsh on ubuntu actiosn gives that diretory 0777 which makes zsh refuse to start
|
||||
sudo hostname ghaction-runner-hostname || true # Set a consistent hostname so we can run tests that depend on it
|
||||
sudo scutil --set HostName ghaction-runner-hostname || true
|
||||
make test
|
||||
|
2
Makefile
2
Makefile
@ -3,7 +3,7 @@ forcetest:
|
||||
HISHTORY_TEST=1 go test -p 1 -timeout 30m ./...
|
||||
|
||||
test:
|
||||
HISHTORY_TEST=1 go test -p 1 -timeout 45m ./...
|
||||
HISHTORY_TEST=1 go test -p 1 -timeout 30m ./...
|
||||
|
||||
acttest:
|
||||
act push -j test -e .github/push_event.json --reuse --container-architecture linux/amd64
|
||||
|
@ -388,7 +388,7 @@ echo thisisrecorded`)
|
||||
// Test the actual table output
|
||||
hostnameMatcher := `\S+`
|
||||
tableDividerMatcher := `\s+`
|
||||
pathMatcher := `~?/?[a-zA-Z_0-9/-]+`
|
||||
pathMatcher := `~?/[a-zA-Z_0-9/-]+`
|
||||
datetimeMatcher := `[a-zA-Z]{3}\s\d{1,2}\s\d{4}\s[0-9:]+\s([A-Z]{3}|[+-]\d{4})`
|
||||
runtimeMatcher := `[0-9.ms]+`
|
||||
exitCodeMatcher := `0`
|
||||
@ -845,7 +845,7 @@ echo hello2
|
||||
}
|
||||
|
||||
func getPidofCommand() string {
|
||||
if runtime.GOOS == "darwin" || runtime.GOOS == "freebsd" {
|
||||
if runtime.GOOS == "darwin" {
|
||||
// MacOS doesn't have pidof by default
|
||||
return "pgrep"
|
||||
}
|
||||
@ -919,9 +919,6 @@ func testTimestampsAreReasonablyCorrect(t *testing.T, tester shellTester) {
|
||||
}
|
||||
|
||||
func testTableDisplayCwd(t *testing.T, tester shellTester) {
|
||||
if runtime.GOOS == "freebsd" {
|
||||
t.Skip()
|
||||
}
|
||||
// Setup
|
||||
defer testutils.BackupAndRestore(t)()
|
||||
installHishtory(t, tester, "")
|
||||
@ -1027,9 +1024,6 @@ echo foo`)
|
||||
}
|
||||
|
||||
func testDisplayTable(t *testing.T, tester shellTester) {
|
||||
if runtime.GOOS == "freebsd" {
|
||||
t.Skip()
|
||||
}
|
||||
// Setup
|
||||
defer testutils.BackupAndRestore(t)()
|
||||
userSecret := installHishtory(t, tester, "")
|
||||
@ -1744,9 +1738,6 @@ func testHandleUpgradedFeatures(t *testing.T, tester shellTester) {
|
||||
}
|
||||
|
||||
func TestFish(t *testing.T) {
|
||||
if runtime.GOOS == "freebsd" {
|
||||
t.Skip()
|
||||
}
|
||||
// Setup
|
||||
defer testutils.BackupAndRestore(t)()
|
||||
tester := bashTester{}
|
||||
@ -2013,9 +2004,6 @@ func testControlR(t *testing.T, tester shellTester, shellName string, onlineStat
|
||||
}
|
||||
|
||||
func testCustomColumns(t *testing.T, tester shellTester) {
|
||||
if runtime.GOOS == "freebsd" {
|
||||
t.Skip()
|
||||
}
|
||||
// Setup
|
||||
defer testutils.BackupAndRestore(t)()
|
||||
installHishtory(t, tester, "")
|
||||
|
@ -1,5 +1,4 @@
|
||||
bash-5.2$ source /Users/runner/.bashrc
|
||||
hishtory tquery -pipefail
|
||||
bash-5.2$ hishtory tquery -pipefail
|
||||
|
||||
|
||||
|
@ -165,7 +165,7 @@ func buildServer() {
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("failed to getwd: %v", err))
|
||||
}
|
||||
if strings.HasSuffix(wd, "/hishtory") || strings.HasSuffix(wd, "/cirrus-ci-build") {
|
||||
if strings.HasSuffix(wd, "/hishtory") {
|
||||
break
|
||||
}
|
||||
err = os.Chdir("../")
|
||||
|
Loading…
Reference in New Issue
Block a user