1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-02-17 01:52:06 +00:00

Merge pull request #1500 from philsmd/master

Appveyor test fix: the test should not run make install (only test a normal make)
This commit is contained in:
Jens Steube 2018-01-26 16:20:55 +01:00 committed by GitHub
commit 772b7bd252
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 57 additions and 52 deletions

View File

@ -1,7 +1,6 @@
environment:
CYG_MIRROR: http://cygwin.mirror.constant.com
CYG_PACKAGES: make,gcc-core,libiconv-devel
DOCUMENT_FOLDER: /share/doc/hashcat
matrix:
- CYG_ROOT: C:\cygwin64
CYG_CACHE: C:\cygwin64\var\cache\setup
@ -15,12 +14,10 @@ environment:
CC: gcc
- MSYSTEM: MINGW64
MSYS_CACHE: C:\msys64\var\cache\pacman\pkg
KERNEL_CACHE: C:\msys64\usr\local\bin\OpenCL\
BASH: C:\msys64\usr\bin\bash
CC: gcc
- MSYSTEM: MINGW32
MSYS_CACHE: C:\msys64\var\cache\pacman\pkg
KERNEL_CACHE: C:\msys64\usr\local\bin\OpenCL\
BASH: C:\msys64\usr\bin\bash
CC: gcc
@ -42,23 +39,18 @@ install:
- if defined MSYSTEM (%BASH% -lc "pacman -Suuy --noconfirm")
build_script:
- if defined BASH (%BASH% -lc "cd $(cygpath ${APPVEYOR_BUILD_FOLDER}) && git submodule update --init && make install")
- if defined BASH (%BASH% -lc "cd $(cygpath ${APPVEYOR_BUILD_FOLDER}) && git submodule update --init && make")
test_script:
# some file globbing tests
# 1. hash file should not exist and therefore hashcat should complain (if it does not there might be a problem)
# 2. hash file should expand to example0.hash and succeed
- ps: >-
if (Test-Path Env:\MSYSTEM)
{
mkdir $env:KERNEL_CACHE 2>&1 | out-null
}
& $env:BASH -lc "hashcat.exe -m 0 --show $env:DOCUMENT_FOLDER/*file_not_found.hash" 2>&1 | out-null
& $env:BASH -lc "cd '$env:APPVEYOR_BUILD_FOLDER' && ./hashcat.exe -m 0 --show *file_not_found.hash" 2>&1 | out-null
if ($LastExitCode -eq 0)
{
throw "test failed"
}
& $env:BASH -lc "hashcat.exe -m 0 --show $env:DOCUMENT_FOLDER/*ple0.hash"
& $env:BASH -lc "cd '$env:APPVEYOR_BUILD_FOLDER' && ./hashcat.exe -m 0 --show *ple0.hash"

View File

@ -334,6 +334,19 @@ win64: hashcat64.exe
## How to make /usr/bin/install doing recursive??
##
# allow (whitelist) "make install" only on unix-based systems (also disallow cygwin/msys)
ifneq ($(findstring install,$(MAKECMDGOALS)),)
ifeq (,$(filter $(UNAME),Linux FreeBSD Darwin))
define ERROR_INSTALL_DISALLOWED
! The 'install' target is not allowed on this operating system ($(UNAME)). \
Only Linux, FreeBSD and Darwin can use the 'install' target
endef
$(error $(ERROR_INSTALL_DISALLOWED))
endif
endif
ifeq ($(SHARED),1)
install: install_docs install_shared install_include install_library install_hashcat
else