diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/views.py')
-rwxr-xr-x | bitbake/lib/toaster/toastergui/views.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 8b685abe83..30295a7260 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -2084,13 +2084,23 @@ if True: | |||
2084 | 2084 | ||
2085 | name = "_js_unit_test_prj_" | 2085 | name = "_js_unit_test_prj_" |
2086 | 2086 | ||
2087 | # If there is an existing project by this name delete it. We don't want | 2087 | # If there is an existing project by this name delete it. |
2088 | # Lots of duplicates cluttering up the projects. | 2088 | # We don't want Lots of duplicates cluttering up the projects. |
2089 | Project.objects.filter(name=name).delete() | 2089 | Project.objects.filter(name=name).delete() |
2090 | 2090 | ||
2091 | new_project = Project.objects.create_project(name=name, release=release) | 2091 | new_project = Project.objects.create_project(name=name, |
2092 | release=release) | ||
2093 | # Add a layer | ||
2094 | layer = new_project.get_all_compatible_layer_versions().first() | ||
2092 | 2095 | ||
2093 | context = { 'project' : new_project } | 2096 | ProjectLayer.objects.get_or_create(layercommit=layer, |
2097 | project=new_project) | ||
2098 | |||
2099 | # make sure we have a machine set for this project | ||
2100 | ProjectVariable.objects.get_or_create(project=new_project, | ||
2101 | name="MACHINE", | ||
2102 | value="qemux86") | ||
2103 | context = {'project': new_project} | ||
2094 | return render(request, "js-unit-tests.html", context) | 2104 | return render(request, "js-unit-tests.html", context) |
2095 | 2105 | ||
2096 | from django.views.decorators.csrf import csrf_exempt | 2106 | from django.views.decorators.csrf import csrf_exempt |