mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 07:45:54 +01:00
Small fix for relative path and documentroot in staticfilemiddleware
This commit is contained in:
parent
b642900431
commit
6c96a6ef3e
@ -124,9 +124,8 @@ constructor TMVCStaticFilesMiddleware.Create(
|
||||
const AStaticFilesCharset: string = TMVCStaticFilesDefaults.STATIC_FILES_CONTENT_CHARSET);
|
||||
begin
|
||||
inherited Create;
|
||||
|
||||
fStaticFilesPath := AStaticFilesPath;
|
||||
fDocumentRoot := ADocumentRoot;
|
||||
fStaticFilesPath := AStaticFilesPath;
|
||||
fDocumentRoot := TPath.Combine(AppPath, ADocumentRoot);
|
||||
fIndexDocument := AIndexDocument;
|
||||
fStaticFilesCharset := AStaticFilesCharset;
|
||||
fSPAWebAppSupport := ASPAWebAppSupport;
|
||||
|
56
tasks.py
56
tasks.py
@ -252,34 +252,6 @@ def build_delphi_project_list(
|
||||
return ret
|
||||
|
||||
|
||||
@task
|
||||
def tests(ctx, delphi_version=DEFAULT_DELPHI_VERSION):
|
||||
"""Builds and execute the unit tests"""
|
||||
import os
|
||||
|
||||
apppath = os.path.dirname(os.path.realpath(__file__))
|
||||
res = True
|
||||
testclient = r"unittests\general\Several\DMVCFrameworkTests.dproj"
|
||||
testserver = r"unittests\general\TestServer\TestServer.dproj"
|
||||
|
||||
print("\nBuilding Unit Test client")
|
||||
build_delphi_project(ctx, testclient, config="CI", delphi_version=delphi_version)
|
||||
print("\nBuilding Test Server")
|
||||
build_delphi_project(ctx, testserver, config="CI", delphi_version=delphi_version)
|
||||
|
||||
# import subprocess
|
||||
# subprocess.run([r"unittests\general\TestServer\Win32\Debug\TestServer.exe"])
|
||||
# os.spawnl(os.P_NOWAIT, r"unittests\general\TestServer\Win32\Debug\TestServer.exe")
|
||||
import subprocess
|
||||
print("\nExecuting tests...")
|
||||
subprocess.Popen([r"unittests\general\TestServer\bin\TestServer.exe"])
|
||||
r = subprocess.run([r"unittests\general\Several\bin\DMVCFrameworkTests.exe"])
|
||||
subprocess.run(["taskkill", "/f", "/im", "TestServer.exe"])
|
||||
if r.returncode > 0:
|
||||
print(r)
|
||||
return Exit("Unit tests failed")
|
||||
|
||||
|
||||
@task
|
||||
def clean(ctx, folder=None):
|
||||
global g_output_folder
|
||||
@ -322,6 +294,34 @@ def clean(ctx, folder=None):
|
||||
rmtree(folder + r"\lib\swagdoc\deploy", True)
|
||||
rmtree(folder + r"\lib\swagdoc\demos", True)
|
||||
|
||||
@task()
|
||||
def tests(ctx, delphi_version=DEFAULT_DELPHI_VERSION):
|
||||
"""Builds and execute the unit tests"""
|
||||
import os
|
||||
|
||||
apppath = os.path.dirname(os.path.realpath(__file__))
|
||||
res = True
|
||||
testclient = r"unittests\general\Several\DMVCFrameworkTests.dproj"
|
||||
testserver = r"unittests\general\TestServer\TestServer.dproj"
|
||||
|
||||
print("\nBuilding Unit Test client")
|
||||
build_delphi_project(ctx, testclient, config="CI", delphi_version=delphi_version)
|
||||
print("\nBuilding Test Server")
|
||||
build_delphi_project(ctx, testserver, config="CI", delphi_version=delphi_version)
|
||||
|
||||
# import subprocess
|
||||
# subprocess.run([r"unittests\general\TestServer\Win32\Debug\TestServer.exe"])
|
||||
# os.spawnl(os.P_NOWAIT, r"unittests\general\TestServer\Win32\Debug\TestServer.exe")
|
||||
import subprocess
|
||||
|
||||
print("\nExecuting tests...")
|
||||
subprocess.Popen([r"unittests\general\TestServer\bin\TestServer.exe"])
|
||||
r = subprocess.run([r"unittests\general\Several\bin\DMVCFrameworkTests.exe"])
|
||||
subprocess.run(["taskkill", "/f", "/im", "TestServer.exe"])
|
||||
if r.returncode > 0:
|
||||
print(r)
|
||||
print("Unit Tests Failed")
|
||||
return Exit("Unit tests failed")
|
||||
|
||||
|
||||
@task(pre=[tests])
|
||||
|
@ -4,7 +4,7 @@
|
||||
<ProjectVersion>18.8</ProjectVersion>
|
||||
<FrameworkType>VCL</FrameworkType>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">GUI</Config>
|
||||
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
<TargetedPlatforms>1</TargetedPlatforms>
|
||||
<AppType>Console</AppType>
|
||||
|
@ -81,6 +81,6 @@ begin
|
||||
except
|
||||
on E: Exception do
|
||||
WriteLn(E.ClassName, ': ', E.Message);
|
||||
end
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -612,7 +612,7 @@ procedure TTestServerController.TestObjectDict;
|
||||
var
|
||||
lDict: IMVCObjectDictionary;
|
||||
begin
|
||||
lDict := ObjectDict(false)
|
||||
lDict := ObjectDict(True)
|
||||
.Add('ncUpperCase_List', GetDataSet, nil, dstAllRecords, ncUpperCase)
|
||||
.Add('ncLowerCase_List', GetDataSet, nil, dstAllRecords, ncLowerCase)
|
||||
.Add('ncCamelCase_List', GetDataSet, nil, dstAllRecords, ncCamelCase)
|
||||
|
Loading…
Reference in New Issue
Block a user